Splash Screen in iOS not Displaying Correctly

I know there are a few old discussions on this topic, which I read, and detailed instructions at https://docs.coronalabs.com/guide/distribution/launchFile/index.html, which I also read and followed to a “t”.

My problem is that I cannot get the splash screen to display in landscape - please see the following:

  1. I created 3 image assets and named them accordingly (Launch.png, Launch@2x.png, Launch@3x.png)

These images are rotated so that in portrait mode they should fill out the screen as if in landscape mode.

  1. I downloaded the Xcode template app and added the assets to the Assets.xcassets folder

  2. I exported the Launch Screen as an Interface Builder Storyboard Package file

  3. I built the app for iOS

No matter what, when the app is launched the splash image always shows up in portrait mode. In the Xcode simulator upside down. On my iPhone the results are inconsistent - initially the splash screen was showing up (in portrait) and then it stopped altogether.

I tried playing with the build settings in Xcode but I suspect these to not affect the outcome.

My build.settings file is:

settings = { orientation = { default = "landscapeRight", supported = { "landscapeLeft", "landscapeRight", }, }, iphone = { plist = { CFBundleIconFiles = {}, UILaunchStoryboardName = "LaunchScreen", UIStatusBarHidden = true }, }, }

Thank you  for any help.
 

Can you provide a .zip of your project as well as the original xcassets file?

Rob

I’m starting to think that the only way to solve this is to use the Corona Splash Screen Control plugin. It appears that Apple, in order to preserve portrait only launch images, doesn’t rotate the launch image when the app is a landscape only app so the image is always in portrait mode. This overrides the effect of rotating the launch image in the Launch Screen storyboard.
Please correct me if I am wrong.

A minimal project demonstrating the problem is attached. It has only one splash screen image attached and the others are too big and the file would exceed the maximum size of 3MB.
 
Thank you.

The Corona Splash Screen Control plugin will have absolutely zero effect on Apple iOS Launch Images.

Also, if you can’t upload larger files, you can put them on a service like Google Drive, DropBox, etc. and share a link to a larger .zip file

Rob

Sorry. Let me clarify.
My point is it appears you cannot use the IOS launch screen as a landscape splash screen and that if you want a landscape splash screen you have to use the Corona Splash Screen Control plugin. This is not because of the Corona plugin but because of how Apple controls the display of the launch screen. Given that you need to use the Corona plugin in any case to have a custom splash screen it hardly matters.
Does that make sense?
Thanks.

First, the Apple UILaunchImage is not supposed to be used for a “Branding Screen”. From Apple’s perspective it should mimic the first screen the user sees to give the illusion than the app is loading faster than it really is. Android doesn’t have the concept of a UILauncher image.

When I tested your project last night, the app was loading way too fast for me to even see your UILaunchImage to tell if it was loading right or not.

If you need a Branding screen what I would recommend is do it in main.lua. Make your UILaunchImage black. Then if you are okay with the Corona Splash screen have your branding screen load afterwards. 

If you want to get rid of the Corona splash screen, you will need to buy the plugin.

Rob

Ok. So issue resolved. Thank you for your responses.
Interesting side note. I know what apple says about using the launch image not for branding but it does seem that many apps do that anyway, native iOS, Corina, etc. I know when I was working as an iOS developer we did that as well.

I would be most apps don’t use UILauncher Images for branding. As a developer you can’t control how long that UILauncherImage is on the screen, so it’s not practical to convey a message.

Rob

An update for those who might run into this issue:
I was using a full screen image as my launch screen which is where the problem lay. iOS will always ensure that the image stays oriented the same no matter if your app is in portrait or landscape mode. So, when my app, which is always lansdscape, is launched, the launch screen was displayed as a vertical rectangle in the middle of the screen (in effect, when you rotate the device from portrait to landscape iOS keeps the launch screen image fixed in the same orientation, or, to look at it another way, when your app launches and rotates 90 degrees form portrait to landscape, the launch image rotates -90 degrees). My ultimate solution was to use an image smaller than the screen on a single color background launch screen.
I did see one note on the web where to get around this issue the developer distorted the launch image so it was squished in from the sides, in effect, taking the landscape oriented image and squeezing it into a portrait mode. He claimed that when the app launches, iOS then stretches the image in landscape mode so it appears correct. My own limited experiment with this did not confirm his results. I mention it in case anyone has something to add.