iosxcodeimagelaunchimage

How to assign launch images in Xcode assets catalog?


Xcode's interface for assigning launch images into an assets catalog is rather confusing. Only 2 image slots are made available given the settings we've chosen (Portrait only, for iOS 8.0 and later) and yet the Apple docs list a variety of resolutions required for their various devices (6s, 6s Plus, 7, 7 Plus, etc.), 12 of them to be exact. I'm using Xcode 8.3 btw.

We are designing portrait images for commonly available devices, but how to assign them here? Notice pics below showing a confusing mismatch between the expected resolutions of images (straight from Apple docs) and the Xcode UI for assigning those images. There are only 6 slots available, and even if the Apple docs described only 6 images, it is impossible to tell which goes where.

EDIT: Deployment target is 8.3.

enter image description here enter image description here


Solution

  • Depending on your deployment target, there's either 3 or 4 total resolutions you need to care about: 5.5" devices, 4.7" devices, 4" devices (e.g. iPhone SE), and if your deployment target is iOS 9 or below then 3.5" devices (e.g. iPhone 4S).

    The "iOS 8.0 and Later" iPhone Portrait gives you the 5.5" and 4.7" devices. If you check the "iOS 7.0 and Later" iPhone Portrait option that will give you "2x" (which I believe is 3.5" devices) and "Retina 4" (which is 4" devices).

    Using those 4 options you'll be able to cover all supported iPhones.

    If you need iPad support, you can check the relevant iPad checkbox. However, it looks like the asset catalog doesn't offer a slot for either iPad Pro, I don't know why not. This answer suggests that for the iPad Pro you should ditch the asset catalog entirely and switch to free images and Info.plist keys.


    You also don't need 12 images for 12 devices. A bunch of the devices share the same resolution. Here are the images you need:

    If you upgrade to Xcode 9 you'll also need an 1125x2436 image for the iPhone X.