Dimitris
Dimitris

Reputation: 403

Landscape Launch Images on Xcode 7 madness

The application only works on landscape mode. Since iOS 9 release is imminent we're preparing our app to support the latest and greatest.

So I've migrated to use .xcassets for the LaunchImages and setup all the images iPhone/iPad supporting back to iOS6. Running the app in an iPhone 6 with iOS 9 installed shows the launch image just fine, but when running the app in an iPhone 6 with iOS 8 it just shows a black screen!

I've also used the UILaunchImages key in the plist and another weird this is happening!

Set the image size to {667, 375} and it works fine on iOS9 but not on iOS 8. Now if you set it to {375, 667} it shows on iOS 8 and squashed on iOS 9!

<dict>
    <key>UILaunchImageOrientation</key>
    <string>Landscape</string>
    <key>UILaunchImageName</key>
    <string>Default-667h</string>
    <key>UILaunchImageSize</key>
    <string>{667, 375}</string>
    <key>UILaunchImageMinimumOSVersion</key>
    <string>8.0</string>
</dict>

Any hints? Is it just a bug? Or am I doing something wrong here?


FIX

What I ended up doing was to maintain the UILauchImages dict in the Info.plist for iOS8 and below. Also I created a launch image storyboard for iOS9 compatibility, the image for the storyboard is stored in xcassets. Just be sure to have the correct height/width in the UILaunchImageSize key of the Info.plist!

Upvotes: 1

Views: 486

Answers (1)

BalestraPatrick
BalestraPatrick

Reputation: 10144

Did you try to use the LaunchScreen.xib file? It's working well for me.

It is much easier and you just need to add your elements and set up Autolayout constraints.

You will make your app lighter without the launch images for each device!

Upvotes: 1

Related Questions