views:

354

answers:

4

I have a 57x57 PNG file in the root of my bundle (update: and added to my project), and the "Icon file" setting in my .plist file has the correct filename, but when the app is installed to the simulator, the icon is the default grey/white one.

I've tried deleting my app from the simulator (both through the simulator and through rm -rf on the app directory from the console), I've tried cleaning my target, and I've tried renaming my app icon, all to no avail.

What do I have to do to get the icon showing?

+1  A: 

One thing you didn't say is that you added it to the project. Once it is in your project, not just the directory, it should appear.

Another problem I have had is that some image editors are "helpful" about the file extension. This can lead to an image file named either "icon.png.png" or "icon" depending on which way they go. Check that too.

Adam Eberbach
I did add it. Good catch though; my question is updated now.
Ben Collins
A: 

I also had a problem where one of my images was named "Icon-iPad.png" but was actually a PSD file, Preview and QuickLook ignored the extension and showed it normally. Double-check the format.

Peter Zich
Good idea - but that wasn't it either.
Ben Collins
A: 

Got it! I added the file to my project, but it was added in association with the wrong target (a unit testing target). I got it associated with my app target and all was well.

Update:

To associate a file with a target, select the file and navigate context menu -> File Info -> Targets

In the File Info dialog under the "Targets" tab, select the target membership desired.

Done.

Ben Collins
A: 

Hello Ben, I am having the same problem you had with your ipad app icon. How did you associate the icon with your app target. Please can you explain the procedure? Thanks a lot.

Nana