views:

1880

answers:

4

I added an Icon.png to my Groups and Files in Xcode for my project. I specified in the .plist file to use Icon.png. I checked the root folder and it successfully copied Icon.png. But when I run the simulator the icon on the home screen is still gray?

Also note, when I first added the icon it worked! Then I changed the Bundle Name, Bundle identifier and Bundle display name. The simulator created a second icon on the home screen, both of which opened the same app.

I deleted both icons from my home screen and now after a build it always creates a gray button.

I tried reverting the plist to a day priors backup, just changing the icon, no luck! I also tried creating a new blank project and adding the icon, still no luck.

It's driving me nuts, it's in the project as Icon.png and I've seen it show up before! I know this sounds crazy, but how could changing Bundle info effect the icon at all?

A: 

A change in the plist file is not always picked up by Xcode. Does cleaning your target and rebuilding it change something?

Edit Shooting in the dark, but check the permission of the icon (once inside the builded application). If it's unreadable, it might be the cause of your problem.

Also, if you have recently installed the sdk, did you reboot since?

Edit 2 Check the name of your icon file and the value for the key CFBundleIconFile in the plist file by paying attention to the case (icon != Icon)

Can you post your plist file?

With a test project, I have seen that the icon file, named Icon.png is picked up automatically, even if the value for the key CFBundleIconFile is empty.

Keep in mind this SKD is:

  • Still in beta
  • Under NDA
Guillaume
No, still gray.
pmhart
Hey, thanks for the update. I've had the SDK for a week now and have rebooted daily. I am downloading the new one. The icon appears in the preview in Xcode when I select it. I have also tried re-naming it and using other icons in the project. I have no problems using icons on my UITabBar, it's not a permissions issue. Maybe it's a bug in the SDK?
pmhart
Update: The beta 3 now displays my Icon.png, thanks for your help
pmhart
A: 

if you can't see your changes when you add the icon, Try renaming the Bundle Display Name or some other property. It seems like when you make some changes to the info plist file Xcode will pick them up. Changing the Bundle name worked for me.

Iggy
+2  A: 

I was unable to get the Icon.png to show up in my Resource list in Xcode until I actually dragged and dropped the icon from Finder into the Xcode Resources folder.

Just physically placing the file out there and setting its name in the info-plist file didn't do the job.

khurley
A: 

I fixed this by deleting and reimporting the icon png. My symptoms were a grey icon when targeting 4.0 and the correct icon when targeting 3.2, from the same codebase and info.plist.

guyal