Black Launch Screen on iPad 2 - Tried Everything

**I followed the new guidelines very carefully, been through it several times at this point to make sure I was doing everything correctly, but just cannot figure our what’s going on. I’ll provide the info here, but the main question I’m curious about is whether the “new” technique is compatible with the “old” technique as far as the Corona build settings are concerned. In other words, will the new icon assets and Launch Screen technique work on a device running iOS 8, 9, and 10, (not just 11 and 12). I assumed so, but everything I’ve tried, and I still get a black launch screen on this iPad 2 (running iOS 9.3.5). On my iPhone X, I cannot really tell, because it loads too quickly. **
**  **
**One difference is that I’m on Xcode 10 and the LaunchScreen template provided by Corona had some build errors, so I just created my own shell project by looking at the template project carefully. Could something have changed with the way the storyboard package is exported? **
**  **
**Another difference is that this particular app only allows landscape mode and uses oversized images (even for the launch screen) and expects an aspect fill (uses “letterBox” mode in Corona SDK). I configured the storyboard as such and it looks great in Xcode. I know the app isn’t used, but the app builds fine and displays the launch screen as expected. Then I exported as a package (.storyboardc), and I copied that file and the images to the root folder of my project (both alongside main.lua). Still get a black screen when loading. **
**  **
**So at this point, I’m wondering if it’s an Xcode 10 difference or maybe an iOS version difference and maybe I have to provide static images also for the older releases? I’ve even tried the many things people said to do when Springboard seems to cache the LaunchScreen image, and I bumped the version just to see if that makes a difference. No matter what I try, this older device just always shows a black screen when opening. It’s a slower device, so it’s great to test the LaunchScreen (all apps have a slight delay when loading - but they all show a proper launch screen so it’s not as annoying). **
**  **
**That said… see attached and read below to see some of the relevant config details. **
**  **
**---------- **
**  **
**Corona SDK Daily Build = 3459 (2019.01.10) **
**  **
build.settings (snippets)

**   orientation =   {     default = “landscapeRight”,     supported =     {       “landscapeLeft”, “landscapeRight”     },   },   – -- –   iphone =   {     xcassets = “Images.xcassets”,     plist =     {       MinimumOSVersion = “8.0”, – needed for Appodeal       NSAppTransportSecurity = { NSAllowsArbitraryLoads=true }, – needed for Appodeal       UIStatusBarHidden = true,       UIApplicationExitsOnSuspend = true, – quit app on suspend       UILaunchStoryboardName = “LaunchScreen”,  – Required!     },   },   – -- –   excludeFiles =   {     all = { “release.txt”, “*.bak” },     android = { “assets/audio-m4a/”, “Launch*.*”, “Images.xcassets” },     ios = { “assets/audio-ogg/”, “Icon-*dpi.png” },   },**

project structure

** [~/project]$ ls *.settings main.lua config.lua L*.* I*.* Icon-hdpi.png Icon-xhdpi.png Launch.png build.settings Icon-ldpi.png Icon-xxhdpi.png Launch@2x.png config.lua Icon-mdpi.png Icon-xxxhdpi.png Launch@3x.png main.lua Images.xcassets: AppIcon.appiconset Contents.json LaunchScreen.storyboardc: 01J-lp-oVM-view-GlT-jt-GVr.nib UIViewController-01J-lp-oVM.nib Info.plist designable.storyboard**

image resolutions (non-standard)

** General Complete name : Launch.png Format : PNG Format/Info : Portable Network Graphic File size : 1.29 MiB Image Format : PNG Format/Info : Portable Network Graphic Format_Compression : LZ77 Width : 1 386 pixels Height : 720 pixels Bit depth : 24 bits Compression mode : Lossless Stream size : 1.29 MiB (100%) General Complete name : Launch@2x.png Format : PNG Format/Info : Portable Network Graphic File size : 2.93 MiB Image Format : PNG Format/Info : Portable Network Graphic Format_Compression : LZ77 Width : 2 079 pixels Height : 1 080 pixels Bit depth : 32 bits Compression mode : Lossless Stream size : 2.93 MiB (100%) General Complete name : Launch@3x.png Format : PNG Format/Info : Portable Network Graphic File size : 4.55 MiB Image Format : PNG Format/Info : Portable Network Graphic Format_Compression : LZ77 Width : 2 772 pixels Height : 1 440 pixels Bit depth : 24 bits Compression mode : Lossless Stream size : 4.55 MiB (100%)**

Alright, I’m going 2 for 2 spamming the forum with things that I ended up solving myself, but in case it helps anyone else… I was able to deduce that my storyboard was actually fine and getting used because I changed the default background color and could see that being used during launch. So I reviewed a little more carefully, expecting that maybe there was another difference I overlooked, and I found a couple things. First, I made sure the deployment target for the project was 9.0 just in case that mattered. Next, I made sure the asset catalog image name was “Launch” as in the sample template provided. I originally named it “LaunchScreen” even though the actual PNG names were “Launch” - tested as the project and then compiled the package and rebuild… and now I’m seeing the launch screen as expected.

So somewhere between those to things made the difference, but by bet is on the latter.

It’s very likely the later. In Xcode, when you create the Storyboard file, you have 3 image slots (1x, 2x, 3x). You can drag in the names “Fred.png”, “Barney.png” and “Wilma.png” if you want to. That asset catalog has a name that’s used to put a UIImage on the storyboard. Then finally you give the whole project a name. These all can be different. But only if you’re building your own setup.

We tried to make it easy with the version that can be downloaded from GitHub by trying to keep things consistent. If you use that .storyboard file, we have used Launch.png Launch@2x.png and Launch@3x.png as those names, so you can use that downloaded .storyboardc file without having to use Xcode as long as your names match. We encourage you to use LaunchScreen.storyboardc as the name, since people like to copy/paste code from our documents and that’s our example. But you can use any name for that storyboardc file that you like as long as you match build.settings to it.

Rob

Alright, I’m going 2 for 2 spamming the forum with things that I ended up solving myself, but in case it helps anyone else… I was able to deduce that my storyboard was actually fine and getting used because I changed the default background color and could see that being used during launch. So I reviewed a little more carefully, expecting that maybe there was another difference I overlooked, and I found a couple things. First, I made sure the deployment target for the project was 9.0 just in case that mattered. Next, I made sure the asset catalog image name was “Launch” as in the sample template provided. I originally named it “LaunchScreen” even though the actual PNG names were “Launch” - tested as the project and then compiled the package and rebuild… and now I’m seeing the launch screen as expected.

So somewhere between those to things made the difference, but by bet is on the latter.

It’s very likely the later. In Xcode, when you create the Storyboard file, you have 3 image slots (1x, 2x, 3x). You can drag in the names “Fred.png”, “Barney.png” and “Wilma.png” if you want to. That asset catalog has a name that’s used to put a UIImage on the storyboard. Then finally you give the whole project a name. These all can be different. But only if you’re building your own setup.

We tried to make it easy with the version that can be downloaded from GitHub by trying to keep things consistent. If you use that .storyboard file, we have used Launch.png Launch@2x.png and Launch@3x.png as those names, so you can use that downloaded .storyboardc file without having to use Xcode as long as your names match. We encourage you to use LaunchScreen.storyboardc as the name, since people like to copy/paste code from our documents and that’s our example. But you can use any name for that storyboardc file that you like as long as you match build.settings to it.

Rob

@rob - I’m trying to figure out what I did wrong to end up getting black launch screen.

Could any of the following be the reason why I’m getting the black screen:

  1. When generating LaunchScreen.storyboardc using launchimage-master.zip file, I double-click on LaunchImage.xcodeproj, starting Xcode.

  2. I then select Assets.xcassets, select Launch, and pick iPhone and iPad for the Devices (instead of the default “Universal”

  3. I drop in the following files for iPhone: LaunchiPhone.png, LaunchiPhone@2x.png, LaunchiPhone@3x.png. I then drop in the following files for iPad: LaunchiPad.png, LaunchiPad@2x.png

  4. I generate the LaunchScreen.storyboardc by experting the file as instructed.

  5. I copy the LaunchScreen.storyboardc file to project root (with main.lua) as well as all the launch images, i.e., LaunchiPhone.png, LaunchiPhone@2x.png, LaunchiPhone@3x.png, LaunchiPad.png, LaunchiPad@2x.png.

Is the problem something to do with my step 2 above? Is not choosing “Universal” device a problem?

Must we use only three launch images (Launch.png, Launch@2x.png and Launch@3x.png) for this to work? If yes, what’s the pixel dimension for Launch.png that would work for both iPhone and iPad (assuming storyboard will properly crop the images to work correctly.)

Please let me know your thoughts. I would very much appreciate it.

Just in case anyone ends up having the same problem, all you need to do is to export LaunchScreen.storyboardc with Universal device setting selected, and only 3 png images with the exact same png file names as the launchimage-master.zip. That appears to be the only way it would work.