Acknowledgement: This post was prompted by posts from fellow developers toga and newbieLUA which made me start thinking about how to create a useable workflow for existing Corona developers.
It looks like having a UILaunchImages array with launch screens isn’t enough to active the “Optimized for iPhone 6, iPhone 6 Plus” tag in the Apple App Store.
Apple state that a Launch Screen File is necessary to activate this tag for their new devices. A Launch Screen File is a new feature in Xcode 6 where one file can replace all the previous launch screens we’ve had to make in the past. This new file is only used by iOS 8 devices, which means if you are targeting previous iOS versions you still need to supply your old PNG files in addition to the new Launch Screen File.
The problem is; How can Corona developers get a Launch Screen File into their project?
The good news is it isn’t too difficult to achieve. The bad news is having to learn how to use Interface Builder to create your file, however that’s out-of-scope of this post.
Below are a few simple steps on how to get a Launch Screen File into your Corona project.
-
Create a Launch Screen file in Xcode Interface Builder (example: LaunchScreen.xib)
-
Use ibtool --compile LaunchScreen.nib LaunchScreen.xib to compile your Launch Screen File.
-
Copy the nib file to your Corona project’s root folder.
-
Add a UILaunchStoryboardName entry to your build.settings file
settings = { iphone = { plist = { UILaunchStoryboardName = “LaunchScreen” } } }
Done!
Build your app for the Xcode Simulator (remember to choose iOS 8) and you’ll see the Launch Screen File being used.
To create a Launch Screen File in Interface Builder:
• Start Xcode, then select File->New->File…
• Choose “Launch Screen” and give it a name (I use LaunchScreen)
• Design your Launch Screen and save.
NOTE: Don’t save the Launch Screen (uncompiled xib-file) in your project root directory. You don’t want to have it distributed with the app. Only the compiled nib should be in the root folder of your project.