Home > Software design >  ios - Is LaunchScreen required in SwiftUI apps for the AppStore?
ios - Is LaunchScreen required in SwiftUI apps for the AppStore?

Time:01-03

I noticed that new SwiftUI iOS apps created in Xcode 13 don't contain a LaunchScreen by default anymore.

However, Apple's guidelines still say (unless it's a bug) that a LaunchScreen is mandatory:

Apps should look great on all models of iPhone and iPad, regardless of display size or aspect ratio. With features like Xcode storyboards, Auto Layout, and SwiftUI, your app’s interface elements and layouts automatically fit the display. Test your apps with the latest devices or the simulator in Xcode 13 to make sure they’re ready to take advantage of the edge-to-edge displays by respecting safe areas, supporting adaptive layouts, and more. Find and address UI issues in your app before testing on a device to make sure your app looks great. App updates must use an Xcode storyboard to provide the app’s launch screen. In addition, new apps that run on iPhone must support all iPhone screens and new apps that run on iPad must support all iPad screens.

Source: https://developer.apple.com/ios/submit/

It seems to me unlikely that Apple would on purpose not put a LaunchScreen into Xcode essentially forcing all developers to start hacking around and adidng LaunchScreen into every app manually.

Is a Launchscreen is still required for SwiftUI apps? If yes, how to properly add a Launchscreen storyboard in a SwiftUI project?

CodePudding user response:

A launchscreen is still needed for your application, so the Apple docs are correct.

For SwiftUI applications you can configure your launchscreen through the info.plist provided for your application alternatively you could probably retrofit the storyboard back in.

For guidance on how to configure your launchscreen through the plist file I'd suggest taking a look at this article.

  • Related