Search code examples
xcodestoryboardlaunchimage

How to convert manual view controller to storyboard as a launch screen


New iOS requirements need Apps for iPhone or iPad must be built with the iOS 13 SDK or later and use an Xcode storyboard to provide the app’s launch screen.

But my project is very old and has never used Storyboards. All UI elements are created dynamically using ViewControllers.

I managed to create a storyboard file and set it as a launcher but it has no scenes and I do not know how to proceed. I would like to:

  • Create a scene where I place only the original launch image inside (hoping that apple still accepts this branding)
  • If it is possible to just connect my main ViewController with the scene (if that works with dynamical ViewControllers)
  • If nothing helps than I would need to create a simple scene which has just a bottom bar like my ViewController

Solution

  • I had this exact issue, here's what I did:

    1. Create LaunchScreen.storyboard and set to use it as launch screen
    2. Using the + button in the top-right (this was not an obvious step), add a View Controller into the storyboard
    3. Untick "Use Safe Area Layout Guides" on the right panel if you're getting that error
    4. Tick "Is Initial View Controller"

    Then clean and run, for me it just worked. I did have trouble seeing it update though, as discussed here: Launch Screen storyboard not displaying image