Default Splash Screen (no more single codebase for multiple platforms)

Apparently, Corona has created the first-ever build.settings switch which prevents us from creating Builds, one after another, without first having to change the build.settings code if you have different Splash Screen settings for different platforms. Of course, I believe this was a terrible oversight when they hastily added it in.

For example, I have to switch out these two lines depending upon what platform I’m creating a build for. In this case, the iOS version is commented out while the Android code is in.

settings = { -- splashScreen = { enable = false }, -- for iOS splashScreen = { enable = true, image = "Default-Landscape.png"}, -- for Android

We really need a conditional build feature, anyway. I have 59 places in my game App where I’m comparing the platform to determine what code to run. I don’t mind this so much because the identical Lua code runs on all devices.

However, having this in build.settings prevents us from having an “if-then-else” statement.

Can Corona or anyone else help with this? Or is this a major inconvenience we need to add to my daily work?

I’d be happy if Corona just added a new setting called:

splashScreenForAndroid = { …

Hi @troylyndon,

Pardon my curiosity here, but you show a different splash screen on iOS vs. Android? Why? Does one have a little Android robot on it or something? No sarcasm intended… I’m just trying to ponder why you would show a different splash screen on each platform. Or, why would you not entirely disable it on both, if that’s what you’re doing on one?

Brent

I think releasing this splash screen control plugin without a warning and testing by Corona users was a very big mistake.

@Brent
May be because of Storyboard Launch Screen on iOS?
[lua] UILaunchStoryboardName = “LaunchScreen”,
UILaunchImages = {


}[/lua]
If I need to show launch screen as image on Android and as Storyboard on iOS do I need to edit build.settings?

The splash screen control does not bypass Apple’s launch images. Android (the OS) has never supported launch images. Way back when we first started doing Android builds, the community wanted launch images, so we had Corona look for Default.png and Default@2x.png and show it.

Fast-forward to today. Apples launch images are hyper complex. We have no ability to disable them. Our Android support only looked for those two images and didn’t look at the other variants that fit modern devices.  Our new splash screen control on Android replaces the out-dated Default.png support. The net effect of this is that on Android you get:

Start App

Show Corona’s controlled splash screen

App’s first screen shows.

On iOS:

Start App

Show Apple’s launch images (if configured)

Show Corona’s controlled splash screen

App’s first screen shows.

On iOS  you are not required to have a launch image. You can take the UILaunchImages table out of build.settings, rename the files so they are not accidentally picked up by older OS’s and just use the splash screen control to get back to a level playing field.

Rob

If I were you, I would stick with enable = “false” , don’t include any launch images and create a simple logo.lua file with a timer to show the logo / image you want. I only include a complete black LaunchScreen.nib file in the root folder and nothing regarding LaunchImages in build.settings.

@Rob, this is the problem I mentioned before at another thread…

Actually same splash images are used.

If we set —> splashScreen = { enable = false }, 

then for iOS , Apple’s launch images will be applied for splash screen with proper size and aspect ratio… it’s good.

however for Android , there will be only dark screen… it could be quite a long period because the Lua code is huge for the app.

if we set —> splashScreen = { enable = true, image = “splashImage.png”},

then for Android , it will be fine to use “splashImage.png” as splash screen.

however for iOS , there will be two splash screens , the first one defined by Apple’s launch images, followed by a second one  of “splashImage.png” defined above.

That’s the reason we have to use 

splashScreen = { enable = false } or iOS, and,

splashScreen = { enable = true, image = “splashImage.png”} for Android

Don’t use Apples  launcher images.

@rob We have to use Apple launcher images because otherwise we’re looking at the black screen while the app is loading the splash screen. Also, the native animation from tapping the icon is zooming into the launch image, not splash image.

Current version of the Splash “feature” is useless. I paid for it to remove it, hoped it would help me with not having all these launch images making my apps bigger in size. Looking forward to next releases.

@rob, Can you please address Wilson’s post above? He nailed the problem exactly, confirming the need for Corona to address this ASAP.

Today, my App was submitted to Apple for Review and we released the Android version in New Zealand. So, in our particular case, we had to remember to change the code in build.settings before creating each build. Corona’s failure to address this, as Wilson has pointed out, will make this situation the ONLY time in Corona’s history whereby the same code-base cannot be used for any platform. Considering the great lengths your team has worked to insure this is never the case, we are hopeful this can be addressed in a new daily build.

Again, I’d be happy if Corona just added a new setting called:

splashScreenForAndroid = { …

Good points and clarification guys. As noted, we’ll internally discuss a per-platform type of usage/syntax and report back with progress when we can.

Brent

This isn’t a situation we had considered (OS specific splash screen on one platform, Corona splash screen on another).  Clearly we need per platform settings for this and we will add them.

Engineering is looking into adding a way to control splash screens by platform. You could turn off our splash screen on iOS for instance and just have Android use images. I don’t have an ETA but

Rob

Hi Rob, Perry and Brent,

Considering that we paid $99 for this without complaining, wouldn’t it be best for Corona to make this a high-priority? Corona’s implementation has broken our ability to compile all platforms from a single code-base.

Kindly always.

Engineering is working on this. I can’t promise an ETA but it should be sooner than later.

Rob

What would be even more useful and awesome is if for iOS, the splash screen replaces the launch image. Currently to create a launch image for iOS is a headache having to go through xCode to create nibs.

That is what we wanted to do but, unfortunately, there are some bugs with how iOS caches launch screens that make them persist between builds in a way that isn’t supportable (bugs that annoyingly don’t affect apps installed with the App Store just ones installed by developers).

We are working on per-platform splash screen settings but, as is sometimes the case, the changes needed to make this happen are quite a bit more complex that one might think.

The documentation on this needs a bit of help. For example:

“You may need to experiment to arrive at the ideal image for your splash screen, but if it’s large enough for the largest device your app is intended to run on, you only need one image.”

There is no image size I can find that looks ok on an iPhone 6/7+ and on an iPad. We finally went to:

splashScreen = { enable = false, }, UILaunchImages = { { -- iPhone 4 Portrait ["UILaunchImageMinimumOSVersion"] = "7.0", ["UILaunchImageName"] = "Default", ["UILaunchImageOrientation"] = "Portrait", ["UILaunchImageSize"] = "{320, 480}" }, etc...

2 side notes here that I’ve heard from other developers and my team and I agree:

  1. There wasn’t nearly enough warning on this, and

  2. The documentation and implementation (especially for Enterprise users) was lacking.

We totally understand you’ve got to make money and we’re happy to pay for a great product. Felt like this was a bit rushed and ended up frustrating your paying user base.

We’ve gone to the trouble of displaying the same launch images that iOS uses, so that we have a near seemless transition for the iOS launch images to our first screen - which is essentially our logo with a “better with Internet and headphones” type of message, and an appropriate copyright at the bottom.

This is already working for us. But we just need to change build.settings every time, particularly if we want to create iOS and Android at the same time. For clarity, this forum thread is specific to the fact that one cannot do this kind of launch image support as we are doing without having to create a separate build for each platform. Of course, you Enterprise guys already have to do this anyway, right?

In Daily Build 2965 we added support for multi-platform splash screen control. Please see:

https://docs.coronalabs.com/daily/plugin/CoronaSplashControl/index.html

Note this is a “daily” build documentation. 

Rob