alecail
alecail

Reputation: 4052

How to set an OSX application dock icon in XCode?

So far the only working solution I have found is to use:

[NSApp setApplicationIconImage: myImage];

But this message is sent after the default icon is already in the dock, so it's not working: the icon is initially set to the default application icon. I have not found the correct place to send this message.

I have read this: How can I set the icon for a Mac Application in Xcode? but it seems a bit too old to be useful for XCode 4.3

What is the standard way to set the dock icon, and even more importantly, where in the documentation is this described ?

Upvotes: 2

Views: 6197

Answers (1)

Kai Mattern
Kai Mattern

Reputation: 3085

I have trashed 4.3 two days ago, so I am using 4.5 developer preview to explain, but it should be similar.

  1. Open up you project
  2. In the left inspector be sure you are in the project navigator
  3. Click the top node which should be named like your project
  4. The middel section should now show some summaries of your project
  5. Click on your Project name under "Targets"
  6. The middle section should now show some Tabs, get on "Summary"
  7. Drag your Icon file to the App Icon field.

Hope that helps.

Upvotes: 2

Related Questions