Black screen on launch with iOS 8 (Landscape apps)

Corona SDK 2014.2446

Xcode 6.0.1

OSX Mavericks 10.9.5

There’s a bug (most likely in Xcode 6 / iOS 8) which prevents landscape only apps from displaying a launch image.

Sample project

Steps to reproduce:

  1. Compile sample project above with iOS 8 SDK

  2. Run on any device with iOS 8 installed

The above sample app (compiled with the iOS 8 SDK) works fine when run on devices with iOS 6 or iOS 7 as Launch images are displayed as expected. Only iOS 8 devices have the issue. The only exception I’ve seen is the iPhone 6 Plus, which displays the Launch Image (I don’t have an iPhone 6 / 6 Plus but I’ve tested in the Xcode simulator).

I filed a bug report last week with Apple about this issue (Apple Radar bug number: 18351823)

Note:

The only way around this issue at the moment is to use Xcode’s new feature for Launch Screen Files (UILaunchStoryboardName), however that’s only possible to use for Enterprise users.

I’m using UILaunchStoryboardName in my apps now and all launch images are showing as expected on iOS 8 as well.

Can you be a little more clear on the bug?  Are you saying you are not getting launch images on iOS 8?  Or does the app black screen after showing the launch image?

Rob

I’m talking only about the Launch Image not showing when run on devices with iOS 8. (Landscape apps as defined in sample project).

Corona app content behaves correctly.

Actually I think I have the answer.  Brent is going to hate me for making him update the guide again…  Try this:

            UILaunchImages = {                 {  --iPhone 4                     ["UILaunchImageMinimumOSVersion"] = "7.0",                     ["UILaunchImageName"] = "Default",                     ["UILaunchImageOrientation"] = "Portrait",                     ["UILaunchImageSize"] = "{320, 480}"                 },                 {  --iPhone 4                     ["UILaunchImageMinimumOSVersion"] = "7.0",                     ["UILaunchImageName"] = "Default",                     ["UILaunchImageOrientation"] = "LandscapeLeft",                     ["UILaunchImageSize"] = "{320, 480}"                 },                 {  --iPhone 4                     ["UILaunchImageMinimumOSVersion"] = "7.0",                     ["UILaunchImageName"] = "Default",                     ["UILaunchImageOrientation"] = "LandscapeRight",                     ["UILaunchImageSize"] = "{320, 480}"                 },                 {  --iPhone 5                     ["UILaunchImageMinimumOSVersion"] = "7.0",                     ["UILaunchImageName"] = "Default-568h",                     ["UILaunchImageOrientation"] = "Portrait",                     ["UILaunchImageSize"] = "{320, 568}"                 },                 {  --iPhone 5                     ["UILaunchImageMinimumOSVersion"] = "7.0",                     ["UILaunchImageName"] = "Default-568h",                     ["UILaunchImageOrientation"] = "LandscapeLeft",                     ["UILaunchImageSize"] = "{320, 568}"                 },                 {  --iPhone 5                     ["UILaunchImageMinimumOSVersion"] = "7.0",                     ["UILaunchImageName"] = "Default-568h",                     ["UILaunchImageOrientation"] = "LandscapeRight",                     ["UILaunchImageSize"] = "{320, 568}"                 },                 {  --iPad landscape                     ["UILaunchImageMinimumOSVersion"] = "7.0",                     ["UILaunchImageName"] = "Default-Landscape",                     ["UILaunchImageOrientation"] = "Landscape",                     ["UILaunchImageSize"] = "{768, 1024}"                 },                 {  --iPhone 6                     ["UILaunchImageMinimumOSVersion"] = "8.0",                     ["UILaunchImageName"] = "Default-667h",                     ["UILaunchImageOrientation"] = "Portrait",                     ["UILaunchImageSize"] = "{375, 667}"                 },                 {  --iPhone 6                     ["UILaunchImageMinimumOSVersion"] = "8.0",                     ["UILaunchImageName"] = "Default-667h",                     ["UILaunchImageOrientation"] = "LandscapeLeft",                     ["UILaunchImageSize"] = "{375, 667}"                 },                 {  --iPhone 6                     ["UILaunchImageMinimumOSVersion"] = "8.0",                     ["UILaunchImageName"] = "Default-667h",                     ["UILaunchImageOrientation"] = "LandscapeRight",                     ["UILaunchImageSize"] = "{375, 667}"                 },                 { -- iPhone 6 Plus landscape left                     ["UILaunchImageMinimumOSVersion"] = "8.0",                     ["UILaunchImageName"] = "Default-Landscape-736h",                     ["UILaunchImageOrientation"] = "LandscapeLeft",                     ["UILaunchImageSize"] = "{414, 736}"                 },                 { -- iPhone 6 Plus landscape right                     ["UILaunchImageMinimumOSVersion"] = "8.0",                     ["UILaunchImageName"] = "Default-Landscape-736h",                     ["UILaunchImageOrientation"] = "LandscapeRight",                     ["UILaunchImageSize"] = "{414, 736}"                 }             }

You have to include the options for LandscapeLeft and LandscapeRight for the phones.

Rob

It’s not only the phones, it’s the same for the iPads as well. Looks like “landscapeLeft” and “landscapeRight” needs to be added for *every* device.

I updated the entries and it does seem to work (sort of). Now the launch screens show, but we have iPhone 5 weirdness. The correct launch image is chosen but it doesn’t activate “tall mode”.

Sorry, I take that back. my config was missing the “Portrait” version of the settings for iPhone 5…

Now the launch images do seem to show correctly. I’ll have to do further testing to confirm…

Wow… This iOS update really messed things up!

I still regard this as an Apple bug though. It shouldn’t be like this.

When using Asset Catalogs for Launch Images it’s the same black launch issue for landscape apps, and there we can’t force settings in Info.plist since the settings are generated by Xcode.

It’s good though that you’ve found a work-around for static images.

Thanks.

…but I’m going to stick with UILaunchStoryboardName from now on. Only one file to rule them all.

I can already see the grumbling on the blog post Tuesday when we talk about the bazillion launch images you have to provide. 

Rob

Hi Rob;

So . . . . . is there going to be a good blog post Tuesday (Sept. 30th) on iPhone 6s and how to deal with them? I’ve been holding back on two significant app updates hoping for some clarification and guidance on these (and OS 8) issues. Haven’t wanted to bug anyone as I know you have all had your hands full!

Steve

It is our intention to run with an iOS8/New iPhone post on Tuesday.  However, there is this guy name Murphy who has a Law… 

Rob

If you have a landscape only app, do we need to provide portrait launch images or can we only have the landscape oriented entries?

I have only an iPad to check with and it doesn’t seem to work with just the default for ipad landscape specified.

It appears that you can have one image, but you need a landscape reference to it in your build.settings.

BTW: Murphy’s Law kicked in, there will be a bit of a delay on the iPhone 6 related tutorial.

Rob

This is still wrong Rob. To work on iPad correctly you need

{  --iPad portrait

                                                        [“UILaunchImageMinimumOSVersion”] = “7.0”,

                                                        [“UILaunchImageName”] = “Default-Portrait”,

                                                        [“UILaunchImageOrientation”] = “Portrait”,

                                                        [“UILaunchImageSize”] = “{768, 1024}”

                                                    },

                                                    {  --iPad landscape

                                                        [“UILaunchImageMinimumOSVersion”] = “7.0”,

                                                        [“UILaunchImageName”] = “Default-Landscape”,

                                                        [“UILaunchImageOrientation”] = “LandscapeLeft”,

                                                        [“UILaunchImageSize”] = “{768, 1024}”

                                                    },

                                                    {  --iPad landscape

                                                        [“UILaunchImageMinimumOSVersion”] = “7.0”,

                                                        [“UILaunchImageName”] = “Default-Landscape”,

                                                        [“UILaunchImageOrientation”] = “LandscapeRight”,

                                                        [“UILaunchImageSize”] = “{768, 1024}”

                                                    },

I seem to have all of the proper launch images showing up on every iOS simulator (thanks to all of the above!!!). One thing I’ve noticed is that on my iPhone 6, when using the app switcher to look at recently used apps, my landscape launch image shows up squished horizontally instead of being rotated into portrait. Is anyone else having this issue?

Incidentally, this is NOT happening on an iPhone 5s running iOS 7…

Regarding landscape-only apps:
 
Remember that the actual png should only be in portrait orientation for phone-devices (like the iPhone 5 image).
This goes for the iPhone 4, 5 and 6. For iPad and iPhone 6 Plus the png should be in landscape orientation.
 
My testing has shown the following 8 entries to be sufficient for landscape only apps (“Portrait” and “Landscape” definitions only).

UILaunchImages = { { --iPhone 4 ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 480}" }, { --iPhone 4 ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "Landscape", ["UILaunchImageSize"] = "{320, 480}" }, { --iPhone 5 ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 568}" }, { --iPhone 5 ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "Landscape", ["UILaunchImageSize"] = "{320, 568}" }, { --iPad landscape ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Landscape", ["UILaunchImageOrientation"] = "Landscape", ["UILaunchImageSize"] = "{768, 1024}" }, { --iPhone 6 ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{375, 667}" }, { --iPhone 6 ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "Landscape", ["UILaunchImageSize"] = "{375, 667}" }, { -- iPhone 6 Plus landscape ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-Landscape-736h", ["UILaunchImageOrientation"] = "Landscape", ["UILaunchImageSize"] = "{414, 736}" } }

The png filenames and dimensions for landscape apps are:

Default.png (320 x 480) Default@2x.png (640 x 960) Default-568h@2x.png (640 x 1136) Default-667h@2x.png (750 x 1334) Default-Landscape-736h@3x.png (2208 x 1242) Default-Landscape.png (1024 x 768) Default-Landscape@2x.png (2048 x 1536)

But, if you’re using the same image for both landscape and portrait for the iPhone, then when the user have the phone on landscape orientation before launching the game, the image will be squished. I assume that for each orientation you need a different version.

@rune7

No, it will not be squished. If you test this on an iPhone 4, 5 or 6 with iOS 7 or 8 you’ll see.

The only launch images that need to be in landscape is the iPad and iPhone 6 Plus images.

Remember when the iPhone 5 came out with “tall-mode”? We needed to have a Default-568h@2x.png to activate it.

For landscape apps we didn’t rotate the image. The launch image was still created in 640 x 1136 portrait. 

(Note: All of my testing is done using Xcode 6.0.1)

Well, I never tested on iphone5 and my only Default-568h version was always in landscape mode. I guess this was wrong all along.

My launch image is simply my brand name over a white background.

So, if the image orientation should be in portrait, shouldn’t we need two different landscape images, one for right and one for left?

it really depends on how the user have his/her phone at the time they launch the game, or does the mechanism assume its always landscape-right to begin with?

The phone will launch in the default orientation. For me I always have landscapeRight as default and create a launch image with any text rotated accordingly (something like this:)

This does however mean that if the user holds the device in landscapeLeft that the launch image will appear upside down until the corona app starts and rotates the screen into the landscapeLeft orientation.

iPads and the iPhone 6 Plus will handle this scenario correctly and display the launch image right-side-up regardless of how the user holds the device, but iPhone 4, 5 and 6 can’t. They will display the launch image in the default orientation first.

But the problem only exist on the 4,5 and 6. since the 6 plus needs the image on landscape orientation anyhow (as the ipad does), or do we need to provide both for the 6 plus?