AppleScript Studio and .icns files

First off i would really like to say THANKS to all the people at Scriptbuilders!
I do really appreciate this website with a lot helpfull information!

A few weeks ago i did start using Xcode for apple script applications and it does work really great.

So now i have finished my first (really simple) application and it does work fine.
But i can’t find how to chose a icon for the application.
I created a .icns with icon composer.
Now i did copy and paste at the “finder info box” off the application.
But i would like to do it the right way. So the .icns file inside the resources folder.
Can anyone please help me? (Just a hint where to start maybe?

Of course this is probably a really simple question but i would really appreciate your help!
I can’t find it in the ADC help library and any where else on the Internet.

Again: Great website, with really nice tutorials!
Sorry for my poor english

Hi,

copy & paste is not the right way for a developer :wink:

In Xcode, choose “Add Existing Files.” from action menu
and select the .icns file, press “Add”.
In the next dialog you may check “Copy Items into destination group’s folder”
then the file appears in the folder structure of the left side of the Xcode window
Drag it into resource folder if it’s not there already.
Hightlight your app in Targets and press cmd-I.
In the tab “Properties” type the name (without .icns extension) into field “Icon file”

that’s it

Thanks for the really fast answer Stefan! That is exactly what i needed!

I’m really starting to enjoy Xcode. Of course the apps i make are really really simple
but it is fun to find out how it works!

I’m maybe going to ask more “stupid” questions in the future :slight_smile: Thanks for the help!

One question relating to icons and the previous post…
How would you make that icon appear in the dock as the dock icon?

Thank You,
Chris

Model: MacBook
AppleScript: 1.10.7
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

Hi Chris,

If I understand you correctly, you want the icon for the application to appear in the Dock, right?

As far as my experience goes, once the .icns icon file is integrated in the application (i.e., it appears in the “About this app…”), the icon stays with the application on each recompile.

To put the icon in the Dock, just drag the icon there from the project build folder. If the icon is simply pasted to the compiled build (using cut and paste as most would intuitively do), the pasted icon disappears on each compile. Get it there via the standard way and it sticks with the application.

Hope that answers your question.

archseed :slight_smile:

In my experience, after adding the app to the dock you have to restart the computer for the icon to appear. This is on 10.3.9

hope that helps,

gecko

To All This Applies To:

        Thank you so much for your input in this matter at hand. I have figured how to make the "About..." box to have my icon and inputted text. Still working on figuring out the dock. :D

Model: MacBook
AppleScript: 2.11
Browser: Safari 419.3
Operating System: Mac OS X (10.4)

It’s really simple:

Edit the Info.plist in your project.
Look for something like this:

<key>CFBundleIconFile</key>
<string>MYICON.icns</string>

Change the string to your icns file!

Rock on!