iOS 7 Icon Files Not Being Used

Hi,

 

When I loaded my game to my new iPad Air, it didn’t look like it was using the retina iPad icon (Icon-76@2x.png); I saw a little softness to it. To confirm this, I made that icon file grayscale and made another build for my iPad. The icon on my iPad was in color, so I tried desaturating Icon-72@2x.png, and sure enough it was black and white.

 

I am using build 1262, and this was a Developer, not Distribution, build. All of the icon files are named and sized correctly, and reside at the root level of my project folder.

 

Here’s my CFBundleIconFiles table:

 

 

  1. CFBundleIconFiles = {
  2.                 “Icon.png”,    – iPhone iOS 6
  3.                 “Icon@2x.png”,    – Retina iPhone iOS 6
  4.                 “Icon-Small-40.png”,    – Search/Settings — all devices
  5.                 “Icon-Small-40@2x.png”,    – Search/Settings — all devices (Retina)
  6.                 “Icon-60.png”,    – iPhone iOS 7
  7.                 “Icon-60@2x.png”,    – Retina iPhone iOS 7
  8.                 “Icon-72.png”,    – iPad iOS 6
  9.                 “Icon-72@2x.png”,    – Retina iPad iOS 6
  10.                 “Icon-76.png”,    – iPad iOS 7
  11.                 “Icon-76@2x.png”,    – Retina iPad iOS 7
  12.                 “Icon-Small-50.png”,    – Search/Settings — iPad iOS 6
  13.                 “Icon-Small-50@2x.png”,    – Search/Settings — Retina iPad iOS 6
  14.                 “Icon-Small.png”,    – Search/Settings — iPhone iOS 6
  15.                 “Icon-Small@2x.png”    – Search/Settings — Retina iPhone iOS 6 
  16.             },

 

 

Any ideas? Is this an error with build 1262?

 

Thanks!
 

  • David

To rule out the possibility of this being a build 1262 issue, I built my game with version 2100, and had the same result: Icon-72@2x was used for my app icon. I’ve followed all of the instructions on the Corona site (http://docs.coronalabs.com/guide/distribution/buildSettings/index.html#appicons), as well as double-checked my icon naming and pixel dimensions, and remade my CFBundleIconFiles table; nothing has helped.

I’m very close to submitting my app, and this seems to be something of a show-stopper. Any help is extremely appreciated.

Thanks,

  • David

I opened the Info.plist file in my app bundle, and here is the CFBundleIconFiles table:

[sharedmedia=core:attachments:1506]

A little help here would be much appreciated.

  • David

I did some further testing, and if I comment out the Icon-72 entries from the CFBundleIconFiles table in build.settings, the Icon-76 file is used properly on my iOS 7.0.4 device.

So now the question becomes: do I need to supply the iOS6-sized Icon-72 files? Apple’s language on their developer site seems a bit ambiguous:

“Table 5-2 lists the dimensions of the icons to include for apps built for iOS 7 and later.”

“Table 5-3 lists the dimensions of the icons you can include for apps built for iOS 6.1 and earlier.”

I’m building my app for iOS 7, though it will be compatible with iOS 6. So should I include the iOS 6 icons? And if so, why are they being used on iOS 7?

Thanks!

  • David

What version of Xcode do you have installed?

@ingemar: I have 5.0.2 installed. Thanks!

That’s the latest Xcode version…

Strange. Your setup looks OK otherwise.

My apps pick up the “*76” icons on iOS 7 and “*72” on iOS 6.

The only difference with my setup is that I specify CFBundleIconFiles without extensions so that iOS will do the work selecting the correct icon file for you.

Like this:

CFBundleIconFiles = { "Icon57", "Icon60", "Icon72", "Icon76", "Icon29", "Icon40", "Icon50" },

Using your filenames, give this a try and see what happens:

CFBundleIconFiles = { "Icon", "Icon-Small-40", "Icon-60", "Icon-72", "Icon-76", "Icon-Small-50", "Icon-Small" },

@ingemar: That fixed it! Thanks a lot for the suggestion! I’m not sure why explicitly declaring the filenames was confusing it, but I’m glad to have a solution, and it simplifies the build.settings file at the same time.

Really appreciate it!

  • David

Hi David, Ingemar,

I want to correct our documentation on this. Can you tell me if it works if you don’t even include these in your “CFBundleIconFiles” table, but simply include all of the correct files in your project directory? I seem to recall reading somewhere that the names aren’t absolutely required, but maybe I’m mistaken…

Thanks,

Brent

If you leave the .png off, then Apple will figure out the @2x versions for you and will attach the .png file on.

I wonder if we should change the order of the 76 and 72px icon files?  I’ll do an experiment and see what’s up.

Rob

Here is the build.settings (relevant parts) that I just used to conduct a test:

settings = {     iphone =     {         plist=        {             UIApplicationExitsOnSuspend = false,             UIPrerenderedIcon = true,             UIStatusBarHidden = false,             UIFileSharingEnabled = true,             CFBundleIconFile = "Icon.png",             CFBundleIconFiles = {                 "Icon.png",                 "Icon@2x.png",                 "Icon-60.png",                 "Icon-60@2x.png",                 "Icon-72.png",                 "Icon-72@2x.png",                 "Icon-76.png",                 "Icon-76@2x.png",                 "Icon-Small.png",                 "Icon-Small@2x.png",                 "Icon-Small-40.png",                 "Icon-Small-40@2x.png",                 "Icon-Small-50.png",                 "Icon-Small-50@2x.png",             },         },     }, }

I took each Icon file and put a number on it indicating the number of pixels.  In other words Icon76@2x.png has a 154 on it.  The 60px one had a 60 etc.

My iPad shows the 154 as I expect (running 7.0) and my iPhone shows 120 as I expect (running 7.1b5).  I don’t have any iOS 6 devices to test on, but I have no reason to suspect that 57/114 and 72/144 would not be picked up using this configuration.

Keep in mind that the filenames are case sensitive and there is a difference between .png and .PNG.  When you specify the .png in the build settings like this, you have to match.  If you follow ingmar’s version, Apple is going to put the .png on the end, and it will find .PNG just as well.   The plist you show is a copy from the build.settings.  I would check the actual filenames on the file system.

Rob.

@Brent

Nope, that won’t work.

No app icon shows if you omit CFBundleIconFiles from build.settings. Tested on iOS7 with the standard daily Corona build 2181 (non-Enterprise version).

I double-checked and the app icons are included in the app bundle, but they’re not picked up by the app.

FWIW CFBundleIconFile  (non-plural) is obsolete and is only needed for devices running iOS 3.1 and older.

@Rob Miracle: I double-checked my file names and image sizes before removing the extensions and 2x versions from my build.settings file. There were no case-sensitive differences. But since the only benefit of removing the file extensions and explicitly-declared 2x versions is that iOS chooses those automatically, it stands to reason that there is some small difference. I just can’t for th elife of me find it!

In any case, glad it works. Thanks everyone! :slight_smile:

To rule out the possibility of this being a build 1262 issue, I built my game with version 2100, and had the same result: Icon-72@2x was used for my app icon. I’ve followed all of the instructions on the Corona site (http://docs.coronalabs.com/guide/distribution/buildSettings/index.html#appicons), as well as double-checked my icon naming and pixel dimensions, and remade my CFBundleIconFiles table; nothing has helped.

I’m very close to submitting my app, and this seems to be something of a show-stopper. Any help is extremely appreciated.

Thanks,

  • David

I opened the Info.plist file in my app bundle, and here is the CFBundleIconFiles table:

[sharedmedia=core:attachments:1506]

A little help here would be much appreciated.

  • David

I did some further testing, and if I comment out the Icon-72 entries from the CFBundleIconFiles table in build.settings, the Icon-76 file is used properly on my iOS 7.0.4 device.

So now the question becomes: do I need to supply the iOS6-sized Icon-72 files? Apple’s language on their developer site seems a bit ambiguous:

“Table 5-2 lists the dimensions of the icons to include for apps built for iOS 7 and later.”

“Table 5-3 lists the dimensions of the icons you can include for apps built for iOS 6.1 and earlier.”

I’m building my app for iOS 7, though it will be compatible with iOS 6. So should I include the iOS 6 icons? And if so, why are they being used on iOS 7?

Thanks!

  • David

What version of Xcode do you have installed?

@ingemar: I have 5.0.2 installed. Thanks!

That’s the latest Xcode version…

Strange. Your setup looks OK otherwise.

My apps pick up the “*76” icons on iOS 7 and “*72” on iOS 6.

The only difference with my setup is that I specify CFBundleIconFiles without extensions so that iOS will do the work selecting the correct icon file for you.

Like this:

CFBundleIconFiles = { "Icon57", "Icon60", "Icon72", "Icon76", "Icon29", "Icon40", "Icon50" },

Using your filenames, give this a try and see what happens:

CFBundleIconFiles = { "Icon", "Icon-Small-40", "Icon-60", "Icon-72", "Icon-76", "Icon-Small-50", "Icon-Small" },

@ingemar: That fixed it! Thanks a lot for the suggestion! I’m not sure why explicitly declaring the filenames was confusing it, but I’m glad to have a solution, and it simplifies the build.settings file at the same time.

Really appreciate it!

  • David