AppStoreReady

SwiftUI Splash Screen: Launch Screen Setup and In-App Animation

Verified againstApple HIG: Launching,Apple: Specifying your app's launch screen,Apple: UILaunchScreen,Apple: UILaunchStoryboardName,Apple HIG: Images (scale factors),Apple Developer Forums: Launch Screen Image not Updatingon November 4, 2026.

A SwiftUI app has two separate things people call a splash screen. The launch screen is static, drawn by the system before your code runs, and configured either with the UILaunchScreen dictionary in Info.plist or with a launch storyboard. Anything animated is a SwiftUI view your app shows after launch, on top of or in front of its first screen.

Option 1: the UILaunchScreen dictionary

Since iOS 14 you can describe the launch screen in Info.plist without a storyboard. In the target's Info tab, under Custom iOS Target Properties, add UILaunchScreen (shown in Xcode as Launch Screen) and give it any of these keys:

KeyTypeWhat it does
UIColorNameStringName of a color in your asset catalog, used as the background. If you leave it out, the system uses systemBackground, which follows light and dark appearance.
UIImageNameStringName of an image in your asset catalog, shown on the launch screen. The background color shows through any transparency.
UIImageRespectsSafeAreaInsetsBooleanWhether the launch image respects the safe area insets.
UINavigationBar, UITabBar, UIToolbarDictionaryShow placeholder bars, so the launch screen matches a first screen that has them.
UILaunchScreen keys, from Apple's Bundle Resources reference.
<key>UILaunchScreen</key>
<dict>
    <key>UIColorName</key>
    <string>LaunchBackground</string>
    <key>UIImageName</key>
    <string>LaunchLogo</string>
    <key>UIImageRespectsSafeAreaInsets</key>
    <true/>
</dict>
Info.plist source for a centered logo on a named background color.

Both values are asset catalog names, the same strings you would pass to UIColor(named:) and UIImage(named:). If the system finds no image, the screen shows only the background color, so when the logo does not appear, check the asset name first.

Option 2: a launch storyboard

If you need layout the plist keys cannot express, such as a logo pinned at a fixed offset with Auto Layout, use a storyboard instead. Set UILaunchStoryboardName to the file name without its extension (LaunchScreen for LaunchScreen.storyboard), or pick the file under Launch Screen File in the target's General tab.

Apple's rules for a launch storyboard are strict: UIKit classes only, a single root UIView or UIViewController, no outlets or actions, no custom classes and no runtime attributes. SwiftUI views cannot appear in it. That is why the animated part has to live in your app.

Asset catalog scale factors

The launch image is an ordinary asset catalog image. Apple's HIG defines @1x as one pixel per point, @2x as two and @3x as three, and lists @2x and @3x as the scale factors to provide for iOS. A logo meant to show at 120 x 120 points needs a 240 x 240 px @2x file and a 360 x 360 px @3x file.

For UIImageName, export only the logo on a transparent background and set the color through UIColorName. A full-screen picture used as UIImageName will not fit every iPhone aspect ratio. The Splash Screen Generator exports full-screen PNGs at native iPhone resolutions: 1320 x 2868 (6.9 inch), 1290 x 2796 (6.7 inch), 1206 x 2622 (6.3 inch), 1179 x 2556 (6.1 inch) and 750 x 1334 (4.7 inch). Those are best used as the reference frame for the in-app splash, or inside a storyboard image view set to aspect fill, not as the plist image.

An animated splash view in SwiftUI

Make the first frame of the SwiftUI splash identical to the launch screen: same background color asset, same logo at the same size and position. The handoff is then invisible, and the animation appears to start from the launch screen.

import SwiftUI

@main
struct InkwellApp: App {
    @State private var showSplash = true

    var body: some Scene {
        WindowGroup {
            ZStack {
                ContentView()
                if showSplash {
                    SplashView { showSplash = false }
                        .transition(.opacity)
                        .zIndex(1)
                }
            }
            .animation(.easeOut(duration: 0.25), value: showSplash)
        }
    }
}

struct SplashView: View {
    let onFinished: () -> Void
    @State private var scale: CGFloat = 1.0

    var body: some View {
        ZStack {
            Color("LaunchBackground").ignoresSafeArea()
            Image("LaunchLogo")
                .scaleEffect(scale)
        }
        .task {
            withAnimation(.easeInOut(duration: 0.4)) { scale = 1.15 }
            try? await Task.sleep(for: .milliseconds(400))
            withAnimation(.easeIn(duration: 0.2)) { scale = 0.9 }
            try? await Task.sleep(for: .milliseconds(200))
            onFinished()
        }
    }
}
Overlay a splash view on the root view and remove it when the animation finishes.

ContentView is created underneath from the start, so its data loading runs while the splash plays. The splash starts at scale = 1.0 so the first frame matches the static launch image. Task.sleep(for:) needs iOS 16. For iOS 15, use Task.sleep(nanoseconds:). Keep the whole sequence under a second: the splash is now time the user spends waiting.

Design the splash before you build it

Preview 16 animation styles with your logo and export PNGs at native iPhone sizes. Processing runs in your browser. Exports are free one size at a time.

Open the Splash Screen Generator

What Apple's HIG allows

  • Nearly identical to the first screen. If the launch screen and first screen differ, people see a flash during the switch. If your app opens to a solid color, the launch screen should be only that color.
  • No text. Launch screen content is static and cannot be localized.
  • Not a branding opportunity. Apple says to leave logos out unless they are a fixed part of your first screen.
  • A splash screen belongs in onboarding. Since June 2024 the HIG says a branded splash can go at the start of onboarding or as soon as launching completes. That is the in-app view above, not the launch screen.

A centered logo on the launch screen is therefore a judgment call. It works best when the SwiftUI splash that follows shows the same logo, so the launch screen is effectively the first frame of your first screen.

Common display bugs

The old launch screen keeps showing

iOS caches the launch screen snapshot, and developers on Apple's forums report it surviving clean builds and app updates. The fixes reported there: delete the app, restart the device, then reinstall, or rename the image asset (for example LaunchLogo2) so the system has to look it up again. Test launch screen changes on a device, not only in the simulator.

Wrong colors in dark mode

The HIG asks the launch screen to match the device's current appearance. Give the LaunchBackground color set a Dark appearance, and add a dark variant to the logo image set if the logo has dark ink. Then use the same assets in SplashView, or the handoff flashes in one mode only. If you set no UIColorName at all, systemBackground already switches with the appearance. For a design checklist, see dark mode splash screens.

The logo jumps at the handoff

UIImageRespectsSafeAreaInsets decides whether the launch image is laid out inside the safe area insets. In the SwiftUI view above, only the color ignores the safe area, so the logo is placed within it. If the logo shifts a few points when the splash view takes over, toggle the key or move ignoresSafeArea() onto the whole ZStack.

Related

Frequently asked questions

Can a SwiftUI view be the launch screen?

No. The launch screen is drawn before your app's code runs, from either the UILaunchScreen Info.plist keys or a UIKit-only storyboard. A SwiftUI view can only appear after launch, which is where an animated splash belongs.

Do I still need a LaunchScreen.storyboard in a SwiftUI app?

Not if the UILaunchScreen dictionary covers what you need: a background color, an image and optional placeholder bars. Use a storyboard only when you need Auto Layout control over positioning.

How do I add a dark mode launch screen in SwiftUI?

Point UIColorName and UIImageName at asset catalog entries that have Any and Dark appearance variants. The system picks the variant that matches the device's current appearance.

Why does my launch screen show no logo, or an old one?

If UIImageName does not match an image in the asset catalog, iOS shows only the background color. If the logo is old, iOS is likely showing a cached launch snapshot: delete the app, restart the device and reinstall before testing again.