How to assign launch images in Xcode assets catalog? - ios

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.

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:
2048x2732 - 12.9" iPad Pro
1668x2224 - 10.5" iPad Pro
1536x2048 - 9.7" iPad, 7.9" iPad mini 4
1242x2208 - iPhone 6s Plus, iPhone 7 Plus, iPhone 8 Plus
750x1334 - iPhone 6, iPhone 6s, iPhone 7, iPhone 8
640x1136 - iPhone 5, iPhone 5s, iPhone 5c, iPhone SE
640x960 - iPhone 4s
If you upgrade to Xcode 9 you'll also need an 1125x2436 image for the iPhone X.

If you would just use a launch storyboard like everyone else, you wouldn't be having any problem. You would just supply one launch storyboard: end of story.
EDIT As of iOS 13 and Xcode 11, this will soon be required. Launch images are dead. Your app must have a launch storyboard.

Related

App Store Screenshots uploading 4,7-inch instead of 5.5-inch

I am planning to submit iOS app on the App Store and my app only supports devices that has eSIM capability. Since none of 5.5-inch devices support eSIM, and since iPhone SE 2 is supported, I was wondering if it's okay if I upload 4.7-inch screenshots instead of 5.5-inch. (Of course, I will upload 6.5-inch screenshots)
From the screenshot specifications from Apple, wordings seems little too vague for me to understand. https://help.apple.com/app-store-connect/#/devd274dd925
5.5 inch (iPhone 8 Plus, iPhone 7 Plus, iPhone 6s Plus) Required if app runs on iPhone
4.7 inch (iPhone SE (2nd generation), iPhone 8, iPhone 7, iPhone 6s, iPhone 6) Required if app runs on iPhone and 5.5-inch screenshots are not provided
Does this mean 4.7-inch can be replaced since 5.5-inch screenshots are not provided? Or does it mean I MUST upload 5.5-inch screenshots since it's Required?

How to take Iphone 4 screenshots with Xcode 8

This SO post gives the image resolutions needed for the Xcode Images.xcassettes when doing the launch image for the Iphone. One of the images needed is the 2x for the Iphone 4. However, since upgrading to Xcode 8, the target builds are only Iphone 5 and above. How do I get a screenshot from the Iphone 4?
Xcode -> Preferences -> Components
Install older version of simulator and iPhone 4S will appear in simulator list.
4 and 4S had identical screen resolutions.
P.S. You also need to set project deployment target to the older version you installed
Don't Take.
In XCode 8.0, You are set deployment target 8.0+, it means in You are developing apps for iOS 8.0 and later. iOS 8 and later will be compatible with iPhone 4s, iPhone 5, iPhone 5c, iPhone 5s, iPod touch 5th generation, iPad 2, iPad with Retina display, iPad Air, iPad mini, and iPad mini with Retina display. So it looks like the iPhone 4 is officially dead to Apple.
You are take iPhone 4S screen shot. if You are set the deployment target 8.0.

Testing #1x view in simulator

Is it still possible to test an #1x view app in simulator, since most iOS devices doesn't support it. Also, I believe that no device will be supported with iOS 10.
The iPad 2 simulators are still available (at least for iOS 9.3).
They have a non retina resolution, so you can use them to run your app in a #1x environment. Even if your app is an iPhone app you can still use them to simulate an #1x iPhone (if your app is iPhone only).
iOS 10 will support the iPad 2 and iPad mini, the two remaining devices which support #1x images (see the Icon and Image Sizes section of the HIG).
With a fresh install of Xcode 8 Beta and iOS 10 beta for these devices I was able to test #1x images.

XCode iOS7 Asset Catalog Warning - Only Supporting iOS8

I am supporting iOS8 and greater in my App. However, I cannot get passed this Image Asset warning. What file am I missing? See the below screenshot:
an iphone retina (4-inch) launch image for ios 7.0 and later is required
You've suppled images for 4.7 and 5.5-inch devices but you need to have one for 4-inch devices as well (pre-iPhone 6).
You will need to select the checkboxes under "iOS 7 and later" (iPad ones if you're making an iPad app, iPhone one if iPhone app, all if Universal) at the right pane. These are used in both iOS 7 and 8.

Enable iphone 6 resolution not enabling iphone 6 plus

I am trying to support iPhone 6 resolution without supporting iphone 6 plus yet.
What I tried already is to add launch image for iphone 6 - Image.xcassets called Retina HD 4.7. Unfortunatelly simulator for 6 plus is reporting 2208x1242 screen size (already multiplied by 3). So 6 plus is supported with just 6 launch image.
I am wondering if its just a simulator bug or the same behavior is on actual iphone 6 plus device - I do not have access to such device yet.
Funny thing: when I added just launch images for 6 plus then simulator for 6 is not starting in 1334x750, instead its 960x640 (when retina 4 launch image is not provided) or 640x1136 (otherwise).
Anyone knows how to support just iPhone 6 resolution not iphone 6 plus?

Resources