how to migrate from AppDelegate to SceneDelegate

Asked on 2025-07-28

1 search

To migrate from AppDelegate to SceneDelegate, you need to adopt the UI Scene Lifecycle, which is becoming mandatory in future iOS releases. Here are the steps to guide you through the migration process:

  1. Update Your App's Info.plist: Define scene configurations in your app's Info.plist file. Each configuration specifies the storyboard or SwiftUI view to use and the delegate class that manages the scene.

  2. Implement SceneDelegate: Create a SceneDelegate class that conforms to the UIWindowSceneDelegate protocol. This class will manage the lifecycle of each scene.

  3. Configure Scene Sessions: In your AppDelegate, implement the application(_:configurationForConnecting:options:) method to return the appropriate scene configuration based on the session's role.

  4. Manage Scene Lifecycle: Use the SceneDelegate to manage the lifecycle events of your scenes, such as when they connect, disconnect, or move to the background. This is where you can handle tasks like pausing ongoing activities or saving state.

  5. State Restoration: Implement state restoration in your SceneDelegate to ensure that the UI state of a scene is preserved and restored correctly.

For more detailed guidance, you can refer to the session Make your UIKit app more flexible (02:01) from WWDC 2025, which covers the importance of adopting the UI Scene Lifecycle and provides examples of how to implement it.

Make your UIKit app more flexible

Make your UIKit app more flexible

Find out how your UIKit app can become more flexible on iPhone, iPad, Mac, and Apple Vision Pro by using scenes and container view controllers. Learn to unlock your app’s full potential by transitioning from an app-centric to a scene-based lifecycle, including enhanced window resizing and improved multitasking. Explore enhancements to UISplitViewController, such as interactive column resizing and first-class support for inspector columns. And make your views and controls more adaptive by adopting new layout APIs.

Customize your app for Assistive Access

Customize your app for Assistive Access

Assistive Access is a distinctive, focused iOS experience that makes it easier for people with cognitive disabilities to use iPhone and iPad independently. In iOS and iPadOS 26, you can customize your app when it’s running in Assistive Access to give people greater ease and independence. Learn how to tailor your app using the AssistiveAccess SwiftUI scene type, and explore the key design principles that can help you create a high-quality Assistive Access experience for everyone.

Explore new advances in App Intents

Explore new advances in App Intents

Explore all the new enhancements available in the App Intents framework in this year’s releases. Learn about developer quality-of-life improvements like deferred properties, new capabilities like interactive app intents snippets, entity view annotations, how to integrate Visual Intelligence, and much more. We’ll take you through how App Intents is more expressive than ever, while becoming even easier and smoother to adopt. We’ll also share exciting new clients of App Intents this year like Spotlight and Visual Intelligence, and learn to write app intents that work great in those contexts.