Launch Screen and Language Detection not working on iOS 9

Hi,

we tested our apps on iOS 9 now and have two small problems:

  1. The launch screen stays black.

We used a launch screen like described in this article:

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

I expect it has something to do with the used SDK and will try to figure this out.

Perhaps iOS has a new handling for launch screens.

  1. Our language detection doesn’t work

We try to detect the device language with system.getPreference( “ui”, “language” ) and to start up the app in the same language detected. For example: If this is “de” we start up in German language and in all other cases the app falls back to the default English language. Perhaps this values / properties have changed in iOS 9.

Perhaps somebody has similar problems.

Cheers,

Tobias

I’ve got exactly the same problem with language detection under iOS 9 - I call system.getPreference( “ui”, “language” ) and it says what returns is not nil, but when I try to use it it throws an error saying it’s nil!

It’s a big problem for me - my very first screen is the language picker and it’s throwing an exception.

Hi @Tobias,

For your first issue (launch screen), can you follow through that tutorial using Xcode 7 and see if that works for you?

@Tobias, @beernathan,

We’ll do some testing on this language thing and see if we can reproduce it. I’ll keep you posted…

Thanks,

Brent

Hi guys,

We tested on our side and we don’t see any issues. See this screenshot:

It looks like things have changed slightly. On iOS 8 I’m getting “en” on language, while on iOS 9 I’m getting “en-US”.

If you consistently want only the two-character code, you should probably stick with system.getPreference( “locale”, “language” ).

I’m only getting something that looks like nil (but doesn’t test as nil). What version of Corona are you guys on? I’m on Version 2015.2697 (2015.8.15).

I would pick up a later daily build and try it. In particular 2708 and later will say “iOS 9 beta” but it’s really iOS 9 GM seed. Tomorrow’s daily build will be the production iOS 9 and give that a try.

Rob

OK thanks Rob - I’ve put a new build in for review that deals with the case as-is, so I can now wait for the full iOS 9 build and go from there.

Nathan.

did anyone figure out how to get the launch image working for iOS 9? i rebuilt my launch screen with Xcode 7 (following tutorial) and am still getting a black box where my launch image used to be. incidentally, the background color specified in the project is showing up-- just not the image provided in the image set. i’m wondering if there are some other settings in Xcode that need to be changed as well.

the language change broke my app as well, so i’m eager to submit an update ASAP…

I would like answers to these issues, too

This seems to be working just fine. In fact it looks like Apple now supports landscape modes on the phones other than the 6 plus.

 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-LandscapeLeft-667h", ["UILaunchImageOrientation"] = "LandscapeLeft", ["UILaunchImageSize"] = "{375, 667}" }, { --iPhone 6 LandscapeRight ["UILaunchImageMinimumOSVersion"] = "8.0", ["UILaunchImageName"] = "Default-LandscapeLeft-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}" } },

This is inside the plist table.

I can’t test it on the 6 plus but on my iPhone 6, I got a Default image in landscape mode.  I provided

Default-568h@2x.png

Default-667h@2x.png

Default-LandscapeLeft-667h.png

Default.png

Default@2x.pgn

Now before I release this app, I’ll add the files for the 6 plus and the landscape orientations for the 5 and the files for the iPad.

Rob

Rob, are you also not having any issues with the launchimage.nib gambit? I’ve noticed now that, for me, builds using it have an intermittent problem of the launch image sometimes appearing and sometimes not on launch.

I’ve not tried that recently.

Rob

So… back to the language detection issue… I upgraded to 2015.2722 today and also switched to the iOS9 SDK. I’m still unable to get a result back from system.getPreference( “ui”, “language” ).

On the simulator it’s fine, but on a device it doesn’t return anything - event testing it for nil returns no result.

Have come across another iOS9 SDK issue, but will log a new ticket for it.

Don’t use “ui”, “language”… use “locale”, “identifier”.

“ca” – catalan

“cs” – czech

“de” – german

“en” – U.S. english

“es” – spanish/mexican

“fr” – french

“ga” – gaelic/irish

“hi” – hindi

“it” – italian

“fi” – finnish

“ja” – japanese

“nl” – dutch

“nb” – norwegian

“pl” – polish

“pt” – portuguese

“ru” – russian

“sv” – swedish

“tr” – turkish

“uk” – ukrainian

I switched to system.getPreference( “locale”, “language” ) and I’m consistently getting the two letter code now. Fixed!

Regarding the Launch Images not showing up in your Enterprise builds, Rob’s build.settings are totally correct.

In Xcode, select your Target > General and make sure “Launch Screen File” is EMPTY. If there is any setting there, it will not work.

I’ve got exactly the same problem with language detection under iOS 9 - I call system.getPreference( “ui”, “language” ) and it says what returns is not nil, but when I try to use it it throws an error saying it’s nil!

It’s a big problem for me - my very first screen is the language picker and it’s throwing an exception.

Hi @Tobias,

For your first issue (launch screen), can you follow through that tutorial using Xcode 7 and see if that works for you?

@Tobias, @beernathan,

We’ll do some testing on this language thing and see if we can reproduce it. I’ll keep you posted…

Thanks,

Brent

Hi guys,

We tested on our side and we don’t see any issues. See this screenshot: