Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Splash Screen in iOS not Displaying Correctly
Started by Edissey Dec 15 2019 06:10 PM

8 replies to this topic
ios launchscreen.storyboardc assest.xcassets
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Edissey

[GLOBAL: userInfoPane.html]
Edissey
  • Enthusiast

  • 54 posts
  • Corona SDK

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.

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

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

4. 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.
 



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,680 posts
  • Enterprise

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

 

Rob



[TOPIC: post.html]
#3

Edissey

[GLOBAL: userInfoPane.html]
Edissey
  • Enthusiast

  • 54 posts
  • Corona SDK

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.

Attached Files



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,680 posts
  • Enterprise

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



[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,680 posts
  • Enterprise

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



[TOPIC: post.html]
#6

Edissey

[GLOBAL: userInfoPane.html]
Edissey
  • Enthusiast

  • 54 posts
  • Corona SDK

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.

[TOPIC: post.html]
#7

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,680 posts
  • Enterprise

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



[TOPIC: post.html]
#8

Edissey

[GLOBAL: userInfoPane.html]
Edissey
  • Enthusiast

  • 54 posts
  • Corona SDK

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.

[TOPIC: post.html]
#9

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,680 posts
  • Enterprise

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




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: ios, launchscreen.storyboardc, assest.xcassets