iphone SDK: Universal binary app icon is blank for iPhone 3G
I have a universal binary iPhone/iPad app. The app icon appears correctly when I install the app on an iPhone4 and an iPad. However, when installed on an iPhone 3G, the icon is blank (gray). I've tried everythin开发者_开发问答g I can think of that might fix this issue and would appreciate suggestions. I followed the Apple icon guidelines for universal apps found here: http://developer.apple.com/library/ios/#qa/qa2010/qa1686.html
- I have a 57x57 icon named Icon.png for the iPhone 3G icon
- In my plist, I have an entry for CFBundleIconFile with a value of "Icon.png". According to Apple this key should be included for backwards compatibility with iPhones running iOS older than v3.2.
- In addition, I have a CFBundleIconFiles entry listing each of the various sized icons -- I included all the recommended icons given by Apple at the developer link above.
- The icon on the iphone simulator, the iPad simulator, the iPhone 4 and the iPad look fine
- I tried cleaning the project
- I verified that Icon.png is being copied to the target
- I verified that the Icon.png is in the app file.
- I verified that the Icon.png is 57x57.
- I've verified that the icon doesn't have an alpha channel. In fact, I tested with an icon from a previous app that did work and that still shows up blank on an iPhone 3G.
- I tried saving the icon as an 8-bit and 24-bit png both with and without transparency.
- Before rebuilding, I deleted the app and rebooted the iPhone.
Try CFBundleIconFiles (value type as an array)
as Icon.png, Icon~iPad.png, Icon@2x.png
There may be two images with same name be present.please check it too.
All the best.
Try all of the above and before building to your device, delete the app from the phone (optionally reboot) and ONLY THEN rebuild to the device.
I was having a similar problem to the one you're having and it drove me insane until I finally figured it out. The problem seems to be that if you have two versions of an app on the same device, the device will display the app icon of the earlier version of that app. I'm pretty sure there's some caching bug in Apple's icon display code that causes this.
These are roughly the repro steps for the bug I got (I'm almost certain you're seeing the same bug):
- Created icon for MyApp.
- Built MyApp on Device Foo.
- I see my icon for MyApp on my device (good!).
- Changed icon for MyApp.
- Created new App ID for MyApp.
- Created new provisioning profiles for MyApp.
- Changed MyApp's Xcode project to use new provisioning profiles.
- Built MyApp on Device Foo.
- Xcode installs a NEW copy of MyApp on Device Foo (because the App ID changed). The old app is still sitting there (it's pretty much dead weight now).
- --> Device Foo displays old icon of MyApp (bad!).
Fix:
- Delete old copy of MyApp
- Delete new copy of MyApp
- Build and launch MyApp from Xcode
- --> New icon should show up on the device.
Notice that I did not build and launch my project between steps 4 and 5? It sounds like you probably did something similar with your app on your 3GS, so I would recommend looking carefully at the apps on your 3GS to try to identify the one that is exposing this Apple bug. Just delete that sucker once you find it. It's probably a good idea to clean out all the old crap on your device anyway.
This is a really easy bug to run into when working with multiple devices.
精彩评论