Launch Images in iOS 7 with Xcode 5

Anden87 picture Anden87 · Sep 12, 2013 · Viewed 74k times · Source

I've been setting my own names on launch images for my apps in the Info.plist like

Info.plist setup for Launch images

with the following images in bundle (with correct dimensions, 320x480 px for default.png and 640x960 px for [email protected] etc.)

Launch images in bundle

this have been working great prior to iOS 7 and Xcode 5. Now when I look in the General tab for the corresponding target in Xcode 5 my launch image files get mixed up from other targets in my project, which worries me, even though I haven't seen wrong launch image files when actually running the target. Should I be worried? The chosen images isn't in the build target so I should be fine there, but is there a risk of getting a blank image instead?

Launch images part of the General tab in Xcode 5

My main question is, can I use my default setup in Info.plist (that help auto detected respective launch images) for iOS 7, and if so, what should I name the corresponding launch images (now that there's the "iOS 6.1 and Prior" options as well with different dimensions)? This especially applies for the iPad Portrait Retina (iOS 7) that has new dimensions. The auto detection on iPad Portrait Non-Retina (iOS 7) refers to an image, not in the build target, that has the right dimensions. Again, when running a simulator with iPad Retina and iOS 7.0 the correct launch image shows.

Answer

RL2000 picture RL2000 · Sep 17, 2013

Anden, I ran into the same problem today while adding a new target to the half dozen I already had that were set up in the same way that you set up yours.

I decided to use that "Use Asset Catalog" button, which took some work to set up, but has simplified things greatly in the end:

1- (optional) Delete (remove references only) the icon and launch image files from your project. I don't think you need the files to be in the project navigator anymore.

2- Choose your primary target, go to "General" and "App Icons" (as you showed above).

3- Press the "Use Asset Catalog" button, with the "Migrate Launch Images" checked as well.

4- This creates a file called "Images.xcassets" in your project navigator. Go there, and find the App Icon and Launch Image catalogs corresponding with the particular target. You can drag and drop image files from the finder into the slots in the catalog, and rename the icon/default groups from the list on the left.

5- Once you've got the image slots filled up, go back to the "General" for each target, and press the "Use Asset Catalog" button again for each target. Instead of creating a new xcassets file for each, you can store all the launch images and icon files in the same xcassets file.