Reputation: 44352
Some recent version of iOS caused my app icon to turn white. I've gone through everything in regards to images and can't find the issue. I'm running Xcode 3.2.5 with sdk 4.2. I do have an entry for "Icon files" in Info.plist with 5 keys: Item 0 myapp.png Item 1 [email protected] Item 2 myapp-72.png Item 3 myapp-Small-50.png Item 4 myapp-Small.png Item 5 [email protected]
All the above have proper dimensions.
I see the image in 'Copy Bundle Resources' and also in the .app file for the simulator version. It is properly reference by name in 'Icon files', Item 0. It is not named Default.png since it is referenced by name in Item 0.
Any suggestions?
Upvotes: 2
Views: 10295
Reputation: 340108
If you believe your icon configuration is correct, then you may simply be seeing a bug in Xcode.
As a workaround…
Xcode > Product > Clean
.iOS Simulator > Reset Content and Settings
.iOS Simulator
and XCode
apps, then restart them.Upvotes: 0
Reputation: 6066
The icon file name may be too long if it is a custom file name. This is just a guess, and I hate guessing, but this appears to have been the problem I just had.
I have four targets using the same code but with different icons. I named the icons differently based on the app name, so I could store them in the same directory.
For example:
Icon.png
Icon_second.png
Icon_alternate.png
Icon_second_alternate.png (or Icon_secondalternate.png in case underscores were an issue)
This nomenclature was used for all of the icon names (there's 8 icon files to support iPhone, iPad, retina, etc).
The last one was giving me a problem. Despite a hundred clean/rebuilds, deleting the schema entirely and creating a new one, fruitless efforts, it suddenly occurred to me to try renaming it.
You should be able to name the icons differently, as I still use the first three versions. They are listed in the plist file and render in the project summary, and on the simulator, just fine. The last one rendered in the summary as well. However, I think the length of the file name was too long for the simulator. There must be a length limit. I renamed the fourth one to use the standard Icon.png naming but added it to the fourth target only (images are stored in a separate folder).
CONCLUSION: If you have more than one target for your app, use the standard naming system for all of your icons but add them to separate folders, and then when adding to Xcode just set the build target appropriately.
Upvotes: 1
Reputation: 21
That is what helped me (project summary - app icons are ok, iOS simulator - app icons are ok, iPhone device - blank icon). Just reconnect your icons to project by dragging them from project navigator to App icon section in project summary.
Upvotes: 2
Reputation: 4936
I had the same problem recently - the Icons I was using were created in GIMP. When I opened them in Photoshop on the development Mac it complained about an ICC color profile. After re-saving the PNGs in Photoshop the Icons worked like a treat.
P.s. I just repeated my steps in creating the images in GIMP, but when saving unticked every extra option that GIMP - by default - was trying to add into the image when saving it. The icons worked perfectly this time around.
Upvotes: 0
Reputation: 70743
Load the icons into the Preview application, and make sure they are really png format (and not just named such) by doing a "Save As..." specifying PNG format in the save dialog. Do a Get Info to check the sizes. Make sure the case of all letters in the name match your plist entries.
Upvotes: 0
Reputation: 52575
When does it turn white? If you upgrade an app when it's running, sometimes it appears with a white icon in the "task" bar. This applies to apps you're developing and those download from iTunes. The fix is usually just to kill the app and restart.
That's the simplest answer, but I suspect might not be the solution.
Does the case of the file names in your Info.plist
match the actual file names? The Simulator is not case sensitive but the iOS is.
You might also like to make a completely clean build. Don't just do a "Clean" in Xcode, instead manually clear out your build folder.
Finally, when the iPhone 4 first came out I had some issues with the order of the icons referenced in the Info.plist
. I never saw white icons (usually just the non-Retina version) but this may be something worth playing with if nothing else works.
Upvotes: 1
Reputation: 8371
You just need those 3 Files:
Icon.png [email protected] Icon-iPad.png
Put the names into the Info.plist under Icon Files.
EDIT: Clean your target if it still won't work!
Upvotes: 2
Reputation: 50727
If you still have the default icon entry (even blank), this can happen, remove that entry in info.plist.
Also, Default.png would be your splash screen.
Upvotes: 0