Issue #927

For a plain SwiftUI project, Xcode will generate a Info.plist file once you start to edit the Info tab in target settings.

There is a Launch screen (UILaunchScreen) key by default. It has a UILaunchScreen which we don’t need to so we can safely remove it. What we need is a background color and an image.

Screenshot 2023-07-04 at 21 34 17

Click the + button next to Launch Screen and type to add Image Name (UIImageName) and Background color (UIColorName)

You can define image and color asset in Asset Catalog

Screenshot 2023-07-04 at 21 36 19

Run the app, your launch screen should be ready

If the image is stretching

Sometimes you have observe that the image stretches regardless if you use png or svg images. If that’s the case you can still use the plain old Launch Screen storyboard.

First, you can remove the Launch screen key in Info plist. Then add a new Launch Screen storyboard

Screenshot 2023-07-05 at 16 31 47

Press the plus icon in the top right navigation bar to select an image, then use Auto Layout to center it in the view

Screenshot 2023-07-05 at 16 32 25

Finally, in your target General tab, select Launch Screen.storyboard file for Launch Screen File

Screenshot 2023-07-05 at 16 33 14