0

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
Alex
  • 343
  • 2
  • 13

1 Answers1

1

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

edbentley
  • 191
  • 10
  • I guess your solution is to put an image to the view controller and not connect the view controller to the dynamic one. Can you give more hints how to set up the image view? Before I had different images in size and orientation for launch. Do I need to add variations for the image? How to do exactly? And any other options I need to configure. – Alex May 13 '20 at 17:23
  • Yep, that's how I did it. I made two images of my splashscreen (one rotated 90 degrees) and added them into the storyboard as an image view (the same way you add a view controller). The rotated image you add as a 'variation', see here: https://i.stack.imgur.com/Fd87J.png Then I added constraints to align to the edges and center the image, and set "Content Mode" to "Aspect Fit" on the right panel. – edbentley May 14 '20 at 11:19
  • I see good results in the view controller for the ui view when I set the landscape variation to Width: Any and Height: Compact and set Content Mode to Aspect Fill because I just have a logo in the center. I deactivated "Use Safe Area Layout Guide" and activated "Use as Launch Screen". I also set the Storyboard as Launch Screen File, removed old LaunchImage assets and set old "Asset Catalog Launch Image Set Name" to empty value. All looks fine and compiles (warning view controller is unreachable is ok I guess) but when I run it on the emulator I only get a black screen. Also on an old iPhone 6 – Alex May 14 '20 at 15:17
  • Possibly the same as the issue I mentioned here? https://stackoverflow.com/questions/36669325/launch-screen-storyboard-not-displaying-image Try booting up a different device emulator and see if it's there or not – edbentley May 14 '20 at 17:52
  • Works now, I also had to set "Is initial View Controller" – Alex May 17 '20 at 16:49