Using iOS launch storyboards – ShiVa Engine

Using iOS launch storyboards

In this tutorial, you will learn how to adhere to Apple’s recent changes for iOS (SDK 13) by replacing the traditional ShiVa splashscreen with a Launch Storyboard.

New iOS requirements

Apple released the following statement in March 2020:

Starting April 30, 2020, all ‌iPhone‌ apps submitted to the ‌App Store‌ must be built with the ‌iOS 13‌ SDK or later. […] all apps submitted to the ‌App Store‌ must use an Xcode storyboard to provide the app’s launch screen and all ‌iPhone‌ apps must support all ‌iPhone‌ screens.

Since ShiVa does not by default use the storyboard feature and instead implements its own splashscreen system, you will have to modify your Xcode project manually to conform with the new requirements.

Creating a storyboard splashscreen

Storyboard splashscreens can easily be created through Xcodes’ New File dialogue (CMD+N). Simply select Launch Screen from the User Interface category and give it a descriptive name:

The storyboard will then appear in the file collection in Xcode’s left panel:

You can now modify the launch screen by adding images, labels, etc. (CMD+SHIFT+L):

Since the launch screen has to work with all resolutions, aspect ratios and orientations, make sure you have a look at the constraints for each element:

In order to be backwards compatible with older iOS releases and deployment targets, you will have to disable the Safe Area Layout Guides. They can be found under the Interface Builder Document properties in the File Inspector:

Once you are happy with your splashscreen, simply add the storyboard file to the target under the General tab:

Disabling the old splashscreen system

Strictly speaking, you do not need to disable ShiVa’s built-in splashscreen system. After the game has loaded, the storyboard will simply fade into the old ShiVa splashscreen. If you do not want to modify any code, you could replace the ShiVa splashscreen image with a solid white or solid black image. However, it is very easy to disable ShiVa’s splashscreen outright by commenting out line 242 in S3DEngine_AppDelegate.m:

With this modification, the storyboard will fade into the game right after loading.

Guidelines for Storyboard splashscreens

Apple has put together a number of guidelines for splash screens that you should adhere to. You can find them under Apple HID – Launch Screen.

The launch screen isn’t an opportunity for artistic expression. It’s solely intended to enhance the perception of your app as quick to launch and immediately ready for use. Every app must supply a launch screen.

In a nutshell, these guidelines are:

– no static image for the launch screen, since they won’t play well with different aspect ratios
– if possible, create a launch screen which is nearly identical to the first screen of your game
– avoid text and do not advertise