dvieira
dvieira

Reputation: 693

iOS 4 app icon not showing

I have an already approved in the App Store app that shows it's icon correctly in iOS 5 but doesn't do so in iOS 4 (at least in 4.2.1). Instead, the default one appears. I believe I have the icons correctly set in the Info.plist (Icon files and Icon files (iOS 5)). I have absolutely no idea what could it be.

I do have my icons named differently than "Icon.png" and such but I believe Apple says that this filename is only required in iOS < 3.2.

If your iPhone app is running in iOS 3.1.3 or earlier, the system does not look for icons using your Info.plist file. The CFBundleIcons key was introduced in iOS 5.0 and the CFBundleIconFiles key was introduced in iOS 3.2.

(in https://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/App-RelatedResources/App-RelatedResources.html#//apple_ref/doc/uid/TP40007072-CH6-SW1)

Strangely enough I renamed my icons to that naming scheme and it worked. Until I decided to add them to the respective fields in the Xcode summary project. But even if I wanted I couldn't use this scheme because I have different targets with different icons.

Does anyone have an idea of what could be happening?

Edit:

I tried to change the name to something else (substituted the @ an ~ to a _ from the previous naming scheme I had - the default for images in iOS) and it works on both the iOS 4 and 5. Don't know why. And I'm not sure that was the problem (doesn't iOS 4 recognize files for icons with those characters?) or if I just messed with some setting, but it works.

Upvotes: 0

Views: 3220

Answers (5)

H.Rabiee
H.Rabiee

Reputation: 4837

Extra tip: if, and only if you have problems with the icon not displaying, then remove the app from the simulator and then deploy to the simulator again.

Upvotes: 1

Rosik
Rosik

Reputation: 323

Take a look at info.plist

I've had 13 records in ícon section, including default.png and icon.png (and default was higher than icon).

Thats why it was showing wrong one.

Upvotes: 0

MobileVet
MobileVet

Reputation: 2958

Does your plist have BOTH icon entries? Starting with iOS 5, there is a new call out for application icons. I am wondering if you only have this field set, but not the legacy field?

The old (original) field in the plist is 'Icon files' and it is an Array.

The new (iOS 5) field in the plist is 'Icon files (iOS 5)' and it is a Dictionary'. The first value under that is 'Primary Icon', also a Dictionary and then the Icon files Array.

They should be generated automatically when you utilize the GUI to add your icons, but it is worth checking that they are both there and have the correct information since you are having trouble.

Upvotes: 0

DarkByte
DarkByte

Reputation: 1176

Try to add them from the GUI - like in here

Good luck !

Upvotes: 1

benzado
benzado

Reputation: 84348

Not sure what's happening, but to address the assertion that "even if I wanted I couldn't use this scheme because I have different targets with different icons"

You can absolutely do this by putting your icons in separate folders. For example, your project folder layout (on disk, not the Xcode project) could look like this:

You can add all those files to your project, making sure each is only associated with the proper target. Xcode will ask you which target to associate with when you add the file, or you can change this in the Info panel (right side of the window) at any time.

If you weren't aware of this, you may have been adding all of the icons files to all of your targets, in which case you are bloating the size of the app unnecessarily.

Upvotes: 0

Related Questions