About Launch Images (iOS and Android)

Hello,

I have 2 questions about Launch Images.

  1. My app is in landscape 800x480. I don’t know which Launch Image should I use to be compatible with all iPhone and iPad? I don’t see it in the following list took in official Corona Guides.

If I use the following settings, is it ok ?

UILaunchImages = {
– iPhone 4 LandscapeRight
{
[“UILaunchImageMinimumOSVersion”] = “7.0”,
[“UILaunchImageName”] = “Default”,
[“UILaunchImageOrientation”] = “LandscapeRight”,
[“UILaunchImageSize”] = “{320, 480}”,
},
– iPad LandscapeRight
{
[“UILaunchImageMinimumOSVersion”] = “7.0”,
[“UILaunchImageName”] = “Default-Landscape”,
[“UILaunchImageOrientation”] = “LandscapeRight”,
[“UILaunchImageSize”] = “{768, 1024}”,
},
},

  1. Now there’s the file LandscapeRight.png in the folder, when I start the app on Android, this image is displayed too. How to disable it for Android?

Thanks for your help!

10984152_651568301613930_340587596226025

If you follow the build.settings guide for iOS you will be good to go.  Please note, iPhones with the exception of the 6 plus do not use Landscape images, however there is/was a bug where you still had to list a landscape option in build.settings, just point it to the portrait image.

However, if you want to get the label in iTunes “Optimized for iPhone 6 and 6 plus” you need to discard that and follow this tutorial instead:   http://coronalabs.com/blog/2014/10/21/tutorial-building-multi-screen-launch-images-using-xcode-6/

Rob

I forgot to add… Android technically does not use Launcher images.  We made Corona look for a “Default.png” file if it exists and shows it during app start up.  It does not look for any other file or higher resolution entry.

Rob

Thank you for all your explanations.

In fact what I is strange for me is there’s no 480x800 launching image resolution in the list, so I must took randomly others available…

Yes I read in the guides that I must include Default-568h@2x.png for backward compatibility with iOS 6. But, since my app is in landscape and not in portrait, is it important because of a bug?

Why would there be a 480x800 image?  There are no iOS devices with that screen resolution.  Android does not use launcher images.  As I said above, we hacked it to read a Default.png at people’s requests, but our Android implementation won’t read anything else. 

Rob

You’re right about iOS and I understood what you did to Android. Well, I’m ready to try this :slight_smile:
Thanks for your clear answers

If you follow the build.settings guide for iOS you will be good to go.  Please note, iPhones with the exception of the 6 plus do not use Landscape images, however there is/was a bug where you still had to list a landscape option in build.settings, just point it to the portrait image.

However, if you want to get the label in iTunes “Optimized for iPhone 6 and 6 plus” you need to discard that and follow this tutorial instead:   http://coronalabs.com/blog/2014/10/21/tutorial-building-multi-screen-launch-images-using-xcode-6/

Rob

I forgot to add… Android technically does not use Launcher images.  We made Corona look for a “Default.png” file if it exists and shows it during app start up.  It does not look for any other file or higher resolution entry.

Rob

Thank you for all your explanations.

In fact what I is strange for me is there’s no 480x800 launching image resolution in the list, so I must took randomly others available…

Yes I read in the guides that I must include Default-568h@2x.png for backward compatibility with iOS 6. But, since my app is in landscape and not in portrait, is it important because of a bug?

Why would there be a 480x800 image?  There are no iOS devices with that screen resolution.  Android does not use launcher images.  As I said above, we hacked it to read a Default.png at people’s requests, but our Android implementation won’t read anything else. 

Rob

You’re right about iOS and I understood what you did to Android. Well, I’m ready to try this :slight_smile:
Thanks for your clear answers

Rob, please correct me if I’m wrong. I finally figured out why launch images weren’t working with my game.

My game is running on an iPhone 6 Plus and is in Landscape mode.

My build.settings file only included LandscapeLeft and LandscapeRight profiles for UILaunchImages for iPhone 4, 5, 6, 6 Plus, and iPad.

Two things were wrong with this: (1) launch images never showed up when running the game, and (2) the iPhone 5 stretched mode was never detected so my game was in 960x640.

The way I fixed this was my including the iPhone 5 Portrait profile in UILaunchImages and putting a Default-568h.png in the directory. The launch image shown was only the Default-568h.png, not the iPhone 6 Plus (or any other one).

Do you know what’s wrong?

EDIT: Additionally, if I just have the iPhone 5 Portrait profile in build.settings but not Default-568h.png then 1136x640 will be enabled but no launch image shows up.

More experimentation: if I include Portrait profiles for iPhone 6 and iPhone 6 Plus, it will load the iPhone 6 launch image (not the 6 Plus one).

The iPhone 3, 4, 5, and 6 only use portrait launch images.  The iPads and iPhone 6 plus support landscape options as well.  However, when we did the blog post on launcher images for iOS 8 and the new phones, we found that even though the iPhone 6 didn’t use landscape mode, you still had to specify it but point it to the portrait image.  The 6plus should let you specify both.

That said, the build.settings entries you have to add to support this is insane:

 UILaunchImages = { { --iPhone 4 Portait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 480}" }, { --iPhone 4 LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{320, 480}" }, { --iPhone 4 LandscapeRight ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{320, 480}" }, { --iPhone 5 Portait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 568}" }, { --iPhone 5 LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{320, 568}" }, { --iPhone 5 LandscapeRight ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{320, 568}" }, { -- iPad / iPad Retina ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Portrait", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{768, 1024}" }, { -- iPad / iPad Retina ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Landscape", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{768, 1024}" }, { -- iPad / iPad Retina ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Landscape", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{768, 1024}" }, { --iPhone 6 Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{375, 667}" }, { --iPhone 6 LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{375, 667}" }, { --iPhone 6 LandscapeRight ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{375, 667}" }, { -- iPhone 6 Plus Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-736h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{414, 736}" }, { -- 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}" } },

Oh, there is another gotcha here.  The values in the {}'s have to be number comma space number. If you leave the space out after the comma it won’t pick it up.

What Apple really wants you to do is build your launcher in Xcode’s Storyboard.  We did a tutorial on that a few weeks after we did the one that produced the build.settings above.  You can see it here:

https://coronalabs.com/blog/2014/10/21/tutorial-building-multi-screen-launch-images-using-xcode-6/

This is a much more elegant way to manage your iOS launch screen. It also gets you the store label “Optimized for the iPhone 6 and 6 plus” which is desirable and it lightens up your package a bit.

Rob

Thanks for that. I will probably do that for my Corona Enterprise build. Yes, this is another tech issue that would be great to fix:

If you build for device using Corona SDK, the BETA ENTITLEMENTS is not set and your iTunes Connect Test Flight upload will fail.

The only way around this is to use Corona Enterprise. I haven’t heard of a workaround yet.

I believe SDK builds have been able to upload to Apple Test flight for several months now.

Rob

I just did it and it failed. No beta entitlement flag set.

Rob, please correct me if I’m wrong. I finally figured out why launch images weren’t working with my game.

My game is running on an iPhone 6 Plus and is in Landscape mode.

My build.settings file only included LandscapeLeft and LandscapeRight profiles for UILaunchImages for iPhone 4, 5, 6, 6 Plus, and iPad.

Two things were wrong with this: (1) launch images never showed up when running the game, and (2) the iPhone 5 stretched mode was never detected so my game was in 960x640.

The way I fixed this was my including the iPhone 5 Portrait profile in UILaunchImages and putting a Default-568h.png in the directory. The launch image shown was only the Default-568h.png, not the iPhone 6 Plus (or any other one).

Do you know what’s wrong?

EDIT: Additionally, if I just have the iPhone 5 Portrait profile in build.settings but not Default-568h.png then 1136x640 will be enabled but no launch image shows up.

More experimentation: if I include Portrait profiles for iPhone 6 and iPhone 6 Plus, it will load the iPhone 6 launch image (not the 6 Plus one).

The iPhone 3, 4, 5, and 6 only use portrait launch images.  The iPads and iPhone 6 plus support landscape options as well.  However, when we did the blog post on launcher images for iOS 8 and the new phones, we found that even though the iPhone 6 didn’t use landscape mode, you still had to specify it but point it to the portrait image.  The 6plus should let you specify both.

That said, the build.settings entries you have to add to support this is insane:

 UILaunchImages = { { --iPhone 4 Portait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 480}" }, { --iPhone 4 LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{320, 480}" }, { --iPhone 4 LandscapeRight ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{320, 480}" }, { --iPhone 5 Portait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 568}" }, { --iPhone 5 LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{320, 568}" }, { --iPhone 5 LandscapeRight ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-568h", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{320, 568}" }, { -- iPad / iPad Retina ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Portrait", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{768, 1024}" }, { -- iPad / iPad Retina ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Landscape", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{768, 1024}" }, { -- iPad / iPad Retina ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default-Landscape", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{768, 1024}" }, { --iPhone 6 Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{375, 667}" }, { --iPhone 6 LandscapeLeft ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{375, 667}" }, { --iPhone 6 LandscapeRight ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-667h", ["UILaunchImageOrientation"] = "LandscapeRight", ["UILaunchImageSize"] = "{375, 667}" }, { -- iPhone 6 Plus Portrait ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-736h", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{414, 736}" }, { -- 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}" } },

Oh, there is another gotcha here.  The values in the {}'s have to be number comma space number. If you leave the space out after the comma it won’t pick it up.

What Apple really wants you to do is build your launcher in Xcode’s Storyboard.  We did a tutorial on that a few weeks after we did the one that produced the build.settings above.  You can see it here:

https://coronalabs.com/blog/2014/10/21/tutorial-building-multi-screen-launch-images-using-xcode-6/

This is a much more elegant way to manage your iOS launch screen. It also gets you the store label “Optimized for the iPhone 6 and 6 plus” which is desirable and it lightens up your package a bit.

Rob

Thanks for that. I will probably do that for my Corona Enterprise build. Yes, this is another tech issue that would be great to fix:

If you build for device using Corona SDK, the BETA ENTITLEMENTS is not set and your iTunes Connect Test Flight upload will fail.

The only way around this is to use Corona Enterprise. I haven’t heard of a workaround yet.

I believe SDK builds have been able to upload to Apple Test flight for several months now.

Rob