How do I create launch images for iPhone 6 / 6 Plus Landscape Only Apps?
Asked Answered
M

11

60

I've got an existing landscape only app that I'm trying to add iPhone 6 / iPhone 6 Plus support for. When I was supporting iOS 6 / 7 I simply used the default-named launch portrait images with a landscape image rotated into portrait (ie. for 4" screens I created a landscape 1136x640 and then rotated to create a 640×1136 launch image.)

I'm trying to get something working for iOS 8 and iPhone 6 / 6+ and have not come up with something that works yet. Here are some things that I have tried:

  1. Follow the pattern for 4" screen launch image convention. I created [email protected] and [email protected] images. This did trick the simulator to run at proper iPhone 6/6+ resolution but when launching, the 4" screen launch image is used, not the new ones I created.
  2. Use an Asset Catalog - I create portrait launch images for iPhone 6 and iPhone 6 Plus in a LaunchImages Asset, as well as a Landscape one for iPhone 6 Plus. The iPhone 6 Plus works, but iPhone 6 just shows a black screen. (There's no way to create a iPhone 6 landscape launch image in an asset catalog)
  3. Specify UILaunchImages array in Info.plist with entries for all screen sizes (see reference https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW28). I get similar results to an Asset Catalog here. I can get iPhone 6 Plus landscape working but not iPhone 6 landscape.
Mcabee answered 19/9, 2014 at 4:58 Comment(7)
Starting from Xcode 6 (if I'm not mistaken), you can implement the launch screen ("splash") using either xibs or storyboards. It may not work for every app, but can save a lot of DefaultXXX.png headaches.Dunleavy
Have a same issue. iPhone 6 shows black screen everytime.Brunell
I tried to do .xib launch screen file and it's work, but I dont know how to support multi-resolution of my image for different iphone screen sizes!Brunell
.xib file is only for iOS 8, for different iOS we still need image assets.Brunell
Send bug report to Apple.Disservice
Just posted what worked for me, @Brunell Let me know if it works for you.Mcabee
I've just found that using the launch xib works great I put a UIImageview in the frame turned off auto layout and made sure it resized to the view frame. Then I just stuck the plus sizes x3 image in and it automatically resizes for small screens.Closefitting
M
75

I found a workaround that makes landscape only launch images work on iOS 8 GM. I ended up using the UILaunchImages array in Info.plist. The trick is to get image to show up that doesn't explicitly support landscape (iPhone 4/4S, iPhone 5/5S/5C, iPhone 6) you need to specify duplicate entries. See my example below. This is for a landscape only phone app that supports both orientations for iPad. iOS 7 will fallback to the default image names.

All iPhone launch images need to be rotated into portrait orientation as usual EXCEPT for the iPhone 6 Plus launch image. It natively supports landscape orientation launch images, so you need to leave it's launch image in landscape orientation.

Here are relevant bits of your Info.plist:

<key>UILaunchImages</key>
<array>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>8.0</string>
        <key>UILaunchImageName</key>
        <string>Default</string>
        <key>UILaunchImageOrientation</key>
        <string>Portrait</string>
        <key>UILaunchImageSize</key>
        <string>{320, 480}</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>8.0</string>
        <key>UILaunchImageName</key>
        <string>Default</string>
        <key>UILaunchImageOrientation</key>
        <string>Landscape</string>
        <key>UILaunchImageSize</key>
        <string>{320, 480}</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>8.0</string>
        <key>UILaunchImageName</key>
        <string>Default-568h</string>
        <key>UILaunchImageOrientation</key>
        <string>Portrait</string>
        <key>UILaunchImageSize</key>
        <string>{320, 568}</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>8.0</string>
        <key>UILaunchImageName</key>
        <string>Default-568h</string>
        <key>UILaunchImageOrientation</key>
        <string>Landscape</string>
        <key>UILaunchImageSize</key>
        <string>{320, 568}</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>8.0</string>
        <key>UILaunchImageName</key>
        <string>Default-667h</string>
        <key>UILaunchImageOrientation</key>
        <string>Portrait</string>
        <key>UILaunchImageSize</key>
        <string>{375, 667}</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>8.0</string>
        <key>UILaunchImageName</key>
        <string>Default-667h</string>
        <key>UILaunchImageOrientation</key>
        <string>Landscape</string>
        <key>UILaunchImageSize</key>
        <string>{375, 667}</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>8.0</string>
        <key>UILaunchImageName</key>
        <string>Default-736h</string>
        <key>UILaunchImageOrientation</key>
        <string>Portrait</string>
        <key>UILaunchImageSize</key>
        <string>{414, 736}</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>8.0</string>
        <key>UILaunchImageName</key>
        <string>Default-736h</string>
        <key>UILaunchImageOrientation</key>
        <string>Landscape</string>
        <key>UILaunchImageSize</key>
        <string>{414, 736}</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>8.0</string>
        <key>UILaunchImageName</key>
        <string>Default-Portrait</string>
        <key>UILaunchImageOrientation</key>
        <string>Portrait</string>
        <key>UILaunchImageSize</key>
        <string>{768, 1024}</string>
    </dict>
    <dict>
        <key>UILaunchImageMinimumOSVersion</key>
        <string>8.0</string>
        <key>UILaunchImageName</key>
        <string>Default-Landscape</string>
        <key>UILaunchImageOrientation</key>
        <string>Landscape</string>
        <key>UILaunchImageSize</key>
        <string>{768, 1024}</string>
    </dict>
</array>
Mcabee answered 21/9, 2014 at 14:25 Comment(7)
is this necessary to add default images for iphone 6 even if app working fine on iphone 6 simulator?Curl
can someone maybe sum up the parts that matter ? Why does this plist work, whats different to normal ones ? i use image catalogs and have no clue about that stuff, sorryPrevise
The reason this works is because of the duplicate entries for landscape/portrait orientation for the same image size. The underlying issue is explained in this SO post.Craniate
You saved my last bit of hair from being pulled out, thank you!Sleepless
Finally! A solution that works and works without using the asset catalog. Thank you!Heavyhanded
You made my day. I had to fix and upgrade an app, which was written during iOS4, when there was only one display size and never released because of bugs. And the customer wanted to release this app with the expectation to run also under iOS9. I couldn't obtain the display size: [UIScreen mainScreen].bounds.size always return the same size 320x480 on every device. I figured out that the app had to start with the right Launch Image to get the size properties set the right way. And your post was the right one to get my work done. THX THX THXDriveway
One more thing: to get the launch screens to orient properly on iPad (running iPhone-only apps in "compatibility mode"), make sure you set your info.plist's "Supported interface orientations (iPad)" to "Portrait (bottom home button)" only: no other orientations. At least, this works in XCode 7.2 for running on iPads with iOS 9.2 and 9.3Disparagement
G
61

The pattern has changed for the iPhone 6 etc

iPhone 6 (750x1334):

Default-375w-667h@2x~iphone.png

iPhone 6 Plus: (1242x2208)

Default-414w-736h@3x~iphone.png

[email protected] (For Landscape)

Note if you support iPad then you must rename your iPad Default images to append ~ipad e.g. Default-Portrait~ipad.png to prevent the 6 plus from picking those up because those override the 3x image.

Germane answered 14/12, 2014 at 20:43 Comment(4)
Thanks, this works perfectly, without the need to add entries in info.plist. But WHERE did you found this pattern ???? (names like "[email protected] doesn't work, of course...)Flowers
I found it by examining the default images used in the built in apps like Maps etc.Germane
Wow, thanks so much! This took me way too long to find.Gardie
I had to use the filenames as specified in this answer (perhaps it was the ~iphone suffix that was required)Nazler
S
14

The following steps worked for me:

  1. Add the images to the project (root directory or Resources folder) with the following nomination (I will describe them into the Portrait launchimages): Default.png (3.5 inch), [email protected] (4 inch), [email protected] (iPhone 6), [email protected] (iPhone 6plus).
  2. Go to the target settings, App Icons And Launch Images on the General tab -> Set the Launch Image Source to not use asset catalog ('Do not use asset catalogs').
  3. Remove the LaunchImage asset from your main image asset
  4. Go to the target settings, App Icons And Launch Images on the General tab -> Set the Launch Image Source to use asset catalog
  5. The XCode 6 is going to ask you about image asset migration from the existing images. Just click to 'Migrate'.

And it worked for me for each kind of devices on iOS7, iOS8. Note: If you check the new LaunchImage asset, then you can see it is really strange. It seems to contain only a few image without the images with iPhone6 or iPhone 6plus resolution.

Spaghetti answered 3/11, 2014 at 23:33 Comment(3)
Are you sure this works? It sounds like it's just using the 4 inch images for iPhone 6/6 Plus. I thought it was working doing something similar to this once as well.Mcabee
Yes, I'm sure. The iPhone 6 and 6 Plus is going to use the right launch images, you can test it even in the Simulator. BTW, if you set up a launch image with not the right resolution, than it will brake your application layout.Spaghetti
EXCELLENT answer.. it really worked well for me...Thank youGoring
L
11

For iPhone 6:

750 x 1334 (@2x) for portrait
1334 x 750 (@2x) for landscape

For iPhone 6 Plus:

1242 x 2208 (@3x) for portrait
2208 x 1242 (@3x) for landscape

or you can go through this link it may help you

http://matthewpalmer.net/blog/2014/09/10/iphone-6-plus-launch-image-adaptive-mode/

Lemieux answered 19/9, 2014 at 5:12 Comment(2)
I know what the correct image sizes are. The issue is if your app is landscape only it won't show up.Mcabee
the answer and link do not address the issuePrevise
L
11

If you are using only Images.xassets "Launch Screen File" should be empty. It helped me.

"Launch screen file" is empty

Lumbard answered 4/12, 2014 at 13:53 Comment(0)
B
4

This is a follow-up to @AlexArgo's answer that extends it so that landscape-only, iOS 9-supporting apps show appropriate launch images on iOS 9 iPhones. As with that answer, no asset catalog, storyboard, or xib is required.

Without these additions, the behavior we saw was that launching our landscape-only app on an iOS 9 iPhone displayed the same image as for iOS 8, but the image was rotated 90-degrees clockwise and distorted by being stretched to the opposite-orientation's dimensions.

Pre-fix iOS 9 iPhone launch screen: Pre-Fix iOS 9 iPhone Launch Screen

There are 2 parts to this solution:

  1. Add the below iOS 9 items to your Info.plist's UILaunchImages array before the iOS 8 items from @AlexArgo's answer.
  2. Add the new launch images referenced in the below iOS 9 items (eg. Default-iOS9-568h) to your app. The new launch images are actual "landscape"-orientation images (wider than they are tall), unlike the images referenced by @AlexArgo's iOS 8 items that started as landscape images but were then rotated to the portrait orientation before being added to the app. Note that both sets of images must remain in the app for this solution to work on iOS 8 and 9 simultaneously.

    <key>UILaunchImages</key>
    <array>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>9.0</string>
            <key>UILaunchImageName</key>
            <string>Default-iOS9</string>
            <key>UILaunchImageOrientation</key>
            <string>Landscape</string>
            <key>UILaunchImageSize</key>
            <string>{320, 480}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>9.0</string>
            <key>UILaunchImageName</key>
            <string>Default-iOS9-568h</string>
            <key>UILaunchImageOrientation</key>
            <string>Landscape</string>
            <key>UILaunchImageSize</key>
            <string>{320, 568}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>9.0</string>
            <key>UILaunchImageName</key>
            <string>Default-iOS9-667h</string>
            <key>UILaunchImageOrientation</key>
            <string>Landscape</string>
            <key>UILaunchImageSize</key>
            <string>{375, 667}</string>
        </dict>
        ...(pre-iOS 9 items)...
    </array>
    

Post-fix iOS 9 iPhone launch screen: enter image description here

Bonney answered 14/10, 2015 at 20:34 Comment(0)
C
2

To work with ipad (landscape and portrait mode), you need to add the UILaunchImages~ipad key in your info.plist :

<key>UILaunchImages~ipad</key>
    <array>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>7.0</string>
            <key>UILaunchImageName</key>
            <string>Default-Landscape</string>
            <key>UILaunchImageOrientation</key>
            <string>Landscape</string>
            <key>UILaunchImageSize</key>
            <string>{768, 1024}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>7.0</string>
            <key>UILaunchImageName</key>
            <string>Default-Portrait</string>
            <key>UILaunchImageOrientation</key>
            <string>Portrait</string>
            <key>UILaunchImageSize</key>
            <string>{768, 1024}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>7.0</string>
            <key>UILaunchImageName</key>
            <string>Default-Landscape</string>
            <key>UILaunchImageOrientation</key>
            <string>Landscape</string>
            <key>UILaunchImageSize</key>
            <string>{748, 1024}</string>
        </dict>
        <dict>
            <key>UILaunchImageMinimumOSVersion</key>
            <string>7.0</string>
            <key>UILaunchImageName</key>
            <string>Default-Portrait</string>
            <key>UILaunchImageOrientation</key>
            <string>Portrait</string>
            <key>UILaunchImageSize</key>
            <string>{768, 1004}</string>
        </dict>
    </array>
Cabalism answered 18/11, 2014 at 13:40 Comment(0)
S
1

For all iPhones except the plus, there is no separate launch screen for landscape-only apps. You set the orientation in the plist as Deepak described, and then you set your portrait launch screen to the rotated version of your landscape launch screen.

This is how it's always been, and the only thing that has changed is that the plus now supports a separate, distinct landscape launch screen. All other devices still only support portrait launch screens regardless of your app's starting orientation.

Septivalent answered 21/9, 2014 at 21:37 Comment(0)
F
1

What I've done is change my project to NOT use an asset catalog for launch images, and use the old technique for iOS7 and earlier. This gets the launch images working for iOS7 and earlier.

To get them also working for iOS8 so that you can get the correct resolution, and have your app recognised as being built for the new iPhone 6/+, you also need to create a new LaunchImage XIB and tell Xcode to use that.

What appears to happen is that launching the app on an iOS8 device uses the new XIB technique, and launching it on an iOS7 or earlier device uses the images you've grown to know and love.

This for me seems to work. It's ugly IMO, but it works.

Hope this helps some people.

Flossi answered 23/9, 2014 at 1:12 Comment(0)
K
0

you just add [email protected], then it will fix itself for Landscape as well. I've also a landscape-only app for iPhone 6 and iPhone 6 Plus and it works without problems!

Kyoko answered 14/11, 2014 at 12:29 Comment(0)
A
-4

To start your application in landscape mode, edit your Info.plist file to add the UIInterfaceOrientation key with the appropriate value (UIInterfaceOrientationLandscapeRight or UIInterfaceOrientationLandscapeLeft), as bellow code. This provides a hint to the system to set the orientation of the status bar appropriately at launch time.

Listing 1: Starting your application in landscape mode

<key>UIInterfaceOrientation</key>
<string>UIInterfaceOrientationLandscapeRight</string> 

for more info click here

Accouplement answered 19/9, 2014 at 5:9 Comment(2)
You can also refer Apple documentation here developer.apple.com/library/ios/technotes/tn2244/_index.htmlAccouplement
I don't have a problem starting the app in landscape. The problem is when starting the app there is no launch image. I just get a black screen.Mcabee

© 2022 - 2024 — McMap. All rights reserved.