Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Default Splash Screen (no more single codebase for multiple platforms)
Started by troylyndon Sep 22 2016 08:31 PM

- - - - -
30 replies to this topic

Best Answer Rob Miracle , 03 October 2016 - 07:34 AM

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

[TOPIC CONTROLS]
Page 1 of 2 1 2
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 397 posts
  • Corona SDK

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?



[TOPIC: post.html]
#2

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 397 posts
  • Corona SDK

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

 

splashScreenForAndroid = { ...



[TOPIC: post.html]
#3

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

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



[TOPIC: post.html]
#4

Andriy Pertsov

[GLOBAL: userInfoPane.html]
Andriy Pertsov
  • Contributor

  • 211 posts
  • Corona SDK

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?

UILaunchStoryboardName = "LaunchScreen",
UILaunchImages = {
.......
}

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



[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 23,507 posts
  • Corona Staff

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



[TOPIC: post.html]
#6

bgmadclown

[GLOBAL: userInfoPane.html]
bgmadclown
  • Contributor

  • 655 posts
  • Corona SDK

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.



[TOPIC: post.html]
#7

wilsonwansun

[GLOBAL: userInfoPane.html]
wilsonwansun
  • Enthusiast

  • 60 posts
  • Corona SDK

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

@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



[TOPIC: post.html]
#8

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 23,507 posts
  • Corona Staff

Don't use Apples  launcher images.



[TOPIC: post.html]
#9

exevio

[GLOBAL: userInfoPane.html]
exevio
  • Observer

  • 16 posts
  • Corona SDK

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



[TOPIC: post.html]
#10

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 397 posts
  • Corona SDK

@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 = { ...



[TOPIC: post.html]
#11

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

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



[TOPIC: post.html]
#12

Perry Clarke

[GLOBAL: userInfoPane.html]
Perry Clarke
  • Moderator

  • 850 posts
  • Corona Staff

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.



[TOPIC: post.html]
#13

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 23,507 posts
  • Corona Staff

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



[TOPIC: post.html]
#14

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 397 posts
  • Corona SDK

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.



[TOPIC: post.html]
#15

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 23,507 posts
  • Corona Staff

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

 

Rob



[TOPIC: post.html]
#16

kilopop

[GLOBAL: userInfoPane.html]
kilopop
  • Contributor

  • 257 posts
  • Corona SDK

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.

[TOPIC: post.html]
#17

Perry Clarke

[GLOBAL: userInfoPane.html]
Perry Clarke
  • Moderator

  • 850 posts
  • Corona Staff

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.



[TOPIC: post.html]
#18

billyfairbank

[GLOBAL: userInfoPane.html]
billyfairbank
  • Observer

  • 21 posts
  • Corona SDK

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.



[TOPIC: post.html]
#19

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 397 posts
  • Corona SDK

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?



[TOPIC: post.html]
#20

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 23,507 posts
  • Corona Staff

  Best Answer

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



[TOPIC: post.html]
#21

troylyndon

[GLOBAL: userInfoPane.html]
troylyndon
  • Contributor

  • 397 posts
  • Corona SDK

Thank you @Rob and the Corona Team!

 

Right now, I'm doing a happy dance.  :D 



[TOPIC: post.html]
#22

jhow

[GLOBAL: userInfoPane.html]
jhow
  • Contributor

  • 158 posts
  • Enterprise

@Rob Miracle,

 

After implementing these instructions, iOS and Google works correctly with regards to getting my own customized splash screen. Unfortunately, when I build a release for Amazon and noticed that I get the Corona splash screen. Can Corona please look into this?

 

Thank you.



[TOPIC: post.html]
#23

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 23,507 posts
  • Corona Staff

Can you post what you have in your build.settings please?

 

Thanks

Rob



[TOPIC: post.html]
#24

jhow

[GLOBAL: userInfoPane.html]
jhow
  • Contributor

  • 158 posts
  • Enterprise

splashScreen = 
{	
	ios = {
		enable = false
	},
	android = {
		enable = true,
		image = "Default-Landscape@2x.png"
	}
},



[TOPIC: post.html]
#25

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 23,507 posts
  • Corona Staff

I'll see what I can find. Can you confirm that when you say "build a release for Amazon" that you're picking Amazon from the list of target stores on the build dialog?

 

Thanks

Rob




[topic_controls]
Page 1 of 2 1 2
 
[/topic_controls]