Clicky

iOS Dev Nugget 102 Static Launch Images for iPhone 6 and iPhone 6 Plus

.

Need to run a code review on your codebase? Hire me

With the release of the iPhone 6 and iPhone 6 Plus, there are 2 more iOS device screen resolutions – 375x667pts and 414x736pts respectively. When you run an app built for iPhone on the iPhone 6 and iPhone Plus, be it on the device or simulator, your app will see the resolution of 320x568pts unless you supply launch images of the correct size. If you look at most of the apps at this time of writing (the iPhone 6 and iPhone 6 Plus is only a few days old), the blown up apps work because of this behavior. While they look better than the 2x mode in iPad, the blown up status bar and keyboard is a dead-giveaway. Here's what you need to do to make your apps run at their native resolution:

  1. Include launch images called Default-667h@2x.png and Default-736h@3x.png.
  2. Update your info.plist to include the UILaunchImages key. Here's a sample including the common combinations:

    UILaunchImages UILaunchImageSize {320, 480} UILaunchImageName Default-480h UILaunchImageMinimumOSVersion 7.0 UILaunchImageOrientation Portrait UILaunchImageSize {320, 568} UILaunchImageName Default-568h UILaunchImageMinimumOSVersion 7.0 UILaunchImageOrientation Portrait UILaunchImageSize {375, 667} UILaunchImageName Default-667h UILaunchImageMinimumOSVersion 8.0 UILaunchImageOrientation Portrait UILaunchImageSize {414, 736} UILaunchImageName Default-736h UILaunchImageMinimumOSVersion 8.0 UILaunchImageOrientation Portrait UILaunchImageSize {768, 1024} UILaunchImageName Default UILaunchImageMinimumOSVersion 7.0 UILaunchImageOrientation Portrait

When you rebuild and run your apps, you'll see that they now report the native resolution.


Your feedback is valuable: Do you want more nuggets like this?   Yes   or   No

.

Like this and want such iOS dev nuggets to be emailed to you, weekly?

Sign Me Up! or follow @iosdevnuggets on Twitter

.

View archives of past issues