开发者

iphone SDK: Universal binary app icon is blank for iPhone 3G

开发者 https://www.devze.com 2023-01-22 03:58 出处:网络
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 tri

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

  1. I have a 57x57 icon named Icon.png for the iPhone 3G icon
  2. 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.
  3. 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.
  4. The icon on the iphone simulator, the iPad simulator, the iPhone 4 and the iPad look fine
  5. I tried cleaning the project
  6. I verified that Icon.png is being copied to the target
  7. I verified that the Icon.png is in the app file.
  8. I verified that the Icon.png is 57x57.
  9. 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.
  10. I tried saving the icon as an 8-bit and 24-bit png both with and without transparency.
  11. 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):

  1. Created icon for MyApp.
  2. Built MyApp on Device Foo.
  3. I see my icon for MyApp on my device (good!).
  4. Changed icon for MyApp.
  5. Created new App ID for MyApp.
  6. Created new provisioning profiles for MyApp.
  7. Changed MyApp's Xcode project to use new provisioning profiles.
  8. Built MyApp on Device Foo.
  9. 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).
  10. --> Device Foo displays old icon of MyApp (bad!).

Fix:

  1. Delete old copy of MyApp
  2. Delete new copy of MyApp
  3. Build and launch MyApp from Xcode
  4. --> 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消