 |
 |
Add an application icon
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: May 2001
Status:
Offline
|
|
I followed the instruction in Learning Cocoa (ch 14) to add an app icon by typing the name of the icon file in the Application Setting pane. But I still got the same default icon in finder and dock when I launched it. I also downloaded and compiled the example in the book and with the same setting, it worked. I wonder if I missed anything?
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Feb 2000
Location: Storrs,Connecticut, USA
Status:
Offline
|
|
I haven't read the book but I have been able to successfully add icons to my projects. Here are some thought of what could be giving you trouble:
First, did you remember to add the icon to your project, ie does it appear in the panel on the left with all of your files? Just putting it into the project folder doesn't work because it will not end up in the application package.
The file that you are using as an icon is an icns file, right? You can't use tiffs or other image formats as icons.
When you typed in the name of the file, did you remember to add the.icns extension?
|
|
|
| |
|
|
|
 |
|
 |
|
Dedicated MacNNer
Join Date: Jan 2001
Location: Virginia, US
Status:
Offline
|
|
The Finder caches the icons for files; maybe this is tripping you up. If you already looked at the .app in the finder before it had an icon, it may have cached the default icon alredy. Try copying the compiled app to another location or relaunch the Finder to see if your app has its icon set up correctly.
If the Info.plist inside the .app wrapper (in the Contents directory) has a CFBundleIconFile setting, and the .icns file listed there also exists (in the Contents/Resources directory), then you set things up correctly.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: May 2001
Status:
Offline
|
|
I have done all of the mentioned but still didn't get the app icon to show.
1. add icon to project
2. ensure icon name in CFBundleIconFile of info.plist
3. ensure icon extension is icns
4. ensure icon is in the app package
5. copy app to another location and still no app icon.
What else could be wrong?
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Feb 2000
Location: Storrs,Connecticut, USA
Status:
Offline
|
|
Try downloading the source to some open source Cocoa App and see what you are doing differently.
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: May 2001
Status:
Offline
|
|
Finder is caching the old app icon. So I had to create a new folder and delete it to cause Finder to refresh the cache. Now it's working.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |