38

I have been stymied figuring out how to release an application from Xcode5 that supports IOS7 AND IOS 6+ in the same build, with assets (icons and splash screens) that load correctly for both, AND still render the assets for IOS 6 correctly. The major hangup I had was trying to make IOS 6 still render the icons without shading or highlighting since the "prerendered" option is no longer even available in Xcode 5's GUI. Any ideas how to get all of the content and the icon to render correctly AND support multiple OS versions?

Andrew

Community
  • 1
  • 1
AndyBean
  • 917
  • 1
  • 8
  • 13
  • 3
    This has been discussed a lot in the Apple dev forum, check it out. – Wain Sep 04 '13 at 22:05
  • 1
    add to app.plist a field named UIPrerenderedIcon with value TRUE – dthien Sep 04 '13 at 22:22
  • As @dthien states above, you need to add the plist field and binary value he mentions. For some reason, though, I had to add that field process twice actually get IOS 6 to stop the rendering effect from being applied. – AndyBean Sep 06 '13 at 18:55

6 Answers6

40

Apple has clear guidelines on requirements for IOS 7 apps but even then, I ran into errors making a single app support multiple OS versions. After getting it to work, I thought I would point out a few areas that were hangups for me to aid others in the future.

I first updated the whole of my app to support IOS 7 cleanly and then went back and enabled previous versions but that process is not necessary.

Just ensure you first set the correct deploy targetdeployment target

Once you set the deployment target, Xcode5 nicely changes the list of default assets it requires to support the multiple OS versions. Ensure you reupload the correct versions of icons at the required resolutions and required filenames (shown below for IOS6-IOS7 support) Icons, their sizes, and their default filenames in Xcode5 for IOS6 -7 support

Do the same for the launch images, note that you will have to rename your launch images to new names, Xcode tries doing this for you if you let it. Note the new sizes below, as IOS7 expands the launch image background behind the status bar. Launch images, their names, and sizes required

Finally, manually add the two .plist flags below and you should be set to have your icons render across IOS versions consistently, with no gloss (explanation follows)

manually add these entries to your plist IOS7 in its new flatness removes the postprocessing the previous versions did where they added a highlight and gloss effect to icons. That effect is no longer done for IOS 7 apps but if you load an app from Xcode5 on IOS 6, it will reapply the default gloss effect. This is infuriating because there no longer is a "prerendered" GUI flag in Xcode to disable that postprocessing. As mentioned above, you need to add the flag manually to your application's plist. In my case, I had to add the flag in two locations to force IOS 6 to stop applying the effect. You can access the plist by either opening the file directly or navigating to the settings in your project overview. You may need to uninstall the app from your simulator and then rebuild the app to force simulator to lose its cache of the old icon.

mklement0
  • 382,024
  • 64
  • 607
  • 775
AndyBean
  • 917
  • 1
  • 8
  • 13
  • The first image is for iOS 6 and second image is for iOS 7 in your answer. Right? and should i use the same app icons name as you have used? – AJ112 Sep 12 '13 at 13:31
  • 1
    @AJ112 if you are talking about my response, yes to support IOS 6 in Xcode 5, you need to select that as the deployment target, and in the second image if you want that same app to support IOS 7 (and at this point you should) you need to supply those icons and at those sizes and character names. – AndyBean Sep 16 '13 at 19:51
  • Does anyone no why there is no difference in the requirement for iPhone launch images on iOS6 vs iOS7? I see a difference for iPad portrait to ensure you address the status bar region. Why not for iPhone? Same for iPad landscape. Why are these the same dimensions on iOS 6 vs iOS7? – Fergal Rooney Nov 01 '13 at 19:01
  • My mistake on the iPad landscape dimensions. They are different. So it just looks like iPhone are the same. – Fergal Rooney Nov 01 '13 at 19:25
  • This was very useful. Totally appreciate your help. Just imagine the mess we would face when Apple releases the iPhone 5.5 inch and 4.7 inch phones. Whew! – KamyFC Aug 29 '14 at 08:21
29

If you setup the asset catalogue you can open it select the image and then go to the inspector and tick this box

Screen shot of xcode 5

Kodejack
  • 441
  • 4
  • 7
25

Just use "asset catalog" (you can select that from general on your target).

That would create an images.xcassets on your project there you can easily drag your icon designs for pre iOS 7 and for iOS 7.

UPDATE: So after the formal release of iOS 7 I can now write this:

On the asset catalog itself select the Appicon set that you want to set as pre-rendered then go to Attribute Inspector and just mark "iOS icon is pre-rendered". you can also set there of course which OS and devices you want to support (it would create all options so you can just drag& drop to set).

Important thing to note is that for some reason if you use several targets and several sets inside this catalog you must add the Target Membership manually. To do this just mark the "asset catalog" file, go to file inspector and mark all targets where you want to use it. I think Apple should do that automatically when you select the "asset catalog" from the target settings but till then I decided to mention that here (took me an hour to figure this out).

Idan
  • 9,880
  • 10
  • 47
  • 76
  • 1
    It seems you have to do this via the attributes inspector - doing it via direct editing of the Info.plist file isn't enough. When I followed @Idan's directions, it finally worked on iOS6. – Rayfleck Sep 24 '13 at 18:47
  • @Rayfleck I think that through Info.plist you can set all icons to be same, meaning support iOs 6&7 but with same icons for both. With asset catalog you can set different icons for each. – Idan Sep 24 '13 at 19:02
13

I went through this recently. Seems by default it only shows the following.

enter image description here

Easy fix is add a new AppIcon

enter image description here

To give you all these options.

enter image description here

DogCoffee
  • 19,820
  • 10
  • 87
  • 120
  • I like this solution for its ease, shame that it crufts things up by having to create a duplicate of AppIcon. – AndyBean Sep 09 '13 at 20:22
  • you can rename it whatever you like, and remove the other one as well. – DogCoffee Sep 10 '13 at 01:08
  • @Smick You shouldn't do it this way. Check out my answer, You can just mark what is missing on the original Appicon asset. – Idan Sep 19 '13 at 21:31
  • 1
    You need not do this. Just click on the Xcode bar to open up the right "Utilities" panel and edit target icons there. (see Kodejacks answer below with a screenshot). – Danoli3 Jan 29 '14 at 09:27
3

My experience with this:

When creating a new empty app, it will create a "default" app icons / launch images asset catalog that is incomplete as stated by @Smick.

The annoying part of this new "catalog" is that it doesn't show the image sizes.

To work around the issue, select the project on the project navigator, and on the "General" you will notice 2 areas - App Icons and Launch Images. Those will point to an asset catalog. You can change it to "don't use asset catalog." After that, the interface will change to a list of files / dimensions.

However there are several issues with this interface:

  1. It should only ask for the retina versions of the images (and compute the normal, or have two links, one for normal and another for retina).
  2. Several images (the launch ones) need to be renamed for them to work (the system does this for you).
  3. Two images are not assignable due to errors (iPad Portrait iOS 7, and iPad Landscape iOS 7, both in normal resolution) - you can specify an image for them, but the image will not stay on and will become de-selected when you insert the next image.
  4. The image dimensions specified are slightly different from the ones stated on the HIG manuals.
  5. I've a strong dislike of the "new" notation of images with points (as they are device dependent and so not exact).
  6. If you don't want to see iOS 6 reapply the "highlight / lighting" on the icons, you need to add a key on the app plist (project manager | project | info. There, you can add a key "Icon already includes gloss effects". You may need to add it also on iOS 5 icons if required.
Jamal
  • 763
  • 7
  • 22
  • 32
Luis Ferro
  • 95
  • 2
1

For Xcode 6

For LaunchImage you must make sure you check iOS 6.0 and Prior iPhone (Portrait ) or iPad // depend on your project configuration

Sizes

Default.png (320x480) 
Default@2x.png (640x960) 
Default-568h@2x.png (640x1136)

enter image description here

The same to AppIcon

Mina Fawzy
  • 20,852
  • 17
  • 133
  • 156