TechBuzzPro

iOS Apps Multiple Windows: Is It Possible and How?

· 6 min read · Phones & Tablets

In this article
  1. Background – From Single‑Window to Multi‑Scene
  2. How Multiple Windows Work
  3. Enabling Multiple Windows in Your App
  4. When to Use Multiple Windows
  5. Common Problems and Debugging Tips
  6. Comparison with iPad Multitasking Features
  7. Alternatives and Workarounds
  8. Frequently Asked Questions

Yes, an iOS application can have more than one window. Starting with iOS 13 Apple introduced the UIScene API, which lets an app create and manage multiple independent windows on iPhone and iPad.

Background – From Single‑Window to Multi‑Scene

Historically iOS presented each app as a single full‑screen window. The UIApplication object owned one UIWindow and the app lifecycle was driven by application(_:didFinishLaunchingWithOptions:). With iPad multitasking and the rise of macOS‑style windowing, Apple added the UIScene architecture in iOS 13. A scene represents one instance of your UI, backed by a UIWindowScene. An app can now declare support for multiple scenes in its Info.plist and the system may create several windows for the same bundle.

How Multiple Windows Work

When an app launches, the system reads the UIApplicationSceneManifest dictionary in the app’s Info.plist. If the manifest lists a scene configuration, the system calls application(_:configurationForConnecting:options:) on the app delegate. The delegate returns a UISceneConfiguration that specifies the class of the scene delegate (often SceneDelegate) and the storyboard or SwiftUI view to load.

Each time the user opens a new window—by dragging an app icon on iPad, using the “New Window” menu, or programmatically calling UIApplication.requestSceneSessionActivation(_:userActivity:options:errorHandler:)—the system creates a new UIWindowScene. The scene delegate receives scene(_:willConnectTo:options:), where you attach a UIWindow to the scene and make it key and visible. Because each scene has its own window hierarchy, state can be kept separate for each window.

Enabling Multiple Windows in Your App

  1. Open the project’s Info.plist and add a UIApplicationSceneManifest dictionary if it does not already exist.
  2. Inside the manifest, create a UISceneConfigurations dictionary with a UIWindowSceneSessionRoleApplication array.
  3. In the array, add a dictionary that defines:
    • UISceneConfigurationName – a friendly name, e.g., “Default Configuration”.
    • UISceneDelegateClassName – typically $(PRODUCT_MODULE_NAME).SceneDelegate.
    • UISceneStoryboardFile – the storyboard that contains the initial view controller, or leave blank for SwiftUI.
  4. Implement a SceneDelegate class (or use SwiftUI’s @main App struct) that creates a UIWindow and assigns it to windowScene.
    func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
        guard let windowScene = scene as? UIWindowScene else { return }
        let window = UIWindow(windowScene: windowScene)
        window.rootViewController = MyRootViewController()
        self.window = window
        window.makeKeyAndVisible()
    }
  5. Optionally expose a UI action that calls UIApplication.shared.requestSceneSessionActivation(nil, userActivity: nil, options: nil, errorHandler: nil) to let users open a new window from within the app.

Remember that the scene‑related APIs are available only on iOS 13 and later. If you still support earlier versions, guard the code with if #available(iOS 13.0, *) checks.

When to Use Multiple Windows

Multiple windows make sense in scenarios where users benefit from side‑by‑side or separate instances of the same content:

  • Productivity apps (documents, spreadsheets, email) where each document can live in its own window.
  • Messaging or social apps that let users view different conversations simultaneously.
  • Design and drawing tools that need independent canvases.

If your app’s workflow revolves around a single, linear task (e.g., a simple game or a utility that shows one screen at a time), adding multi‑window support may add unnecessary complexity without clear user benefit.

Common Problems and Debugging Tips

Developers often encounter a few predictable issues when first enabling scenes:

  • Missing scene manifest. The app will crash with “No scene configuration found” if the UIApplicationSceneManifest is absent or malformed. Double‑check the dictionary keys and spelling.
  • Window not attached. If window.makeKeyAndVisible() is omitted, the new scene appears blank. Verify that the window is created inside scene(_:willConnectTo:) and assigned to the delegate’s window property.
  • State restoration conflicts. Each scene has its own NSUserActivity. Ensure you store and restore data per‑scene, not globally, to avoid mixing up user content.
  • App delegate methods not called. With scenes, many lifecycle events move to the scene delegate. If you still rely on applicationDidEnterBackground(_:), you may miss per‑scene transitions. Implement the corresponding sceneDidEnterBackground(_:) method instead.

Typical debugging flow:

  1. Run the app on a device or simulator with iOS 13+.
  2. Open the multitasking UI (swipe up on iPad or use the app switcher) and select “New Window”.
  3. Observe the console for any “Scene configuration” warnings.
  4. If the new window is empty, place a breakpoint in scene(_:willConnectTo:) and verify the window is created.
  5. Use the “Debug > View Debugging > Capture View Hierarchy” tool to see whether the root view controller is attached.

Comparison with iPad Multitasking Features

iPad multitasking offers Split View, Slide Over, and Stage Manager. Those features work independently of the app’s own multi‑window support; they simply resize the single window the app provides. When an app supports multiple scenes, each scene can be placed in its own Split View pane, giving the user true independent instances. In contrast, a single‑scene app can only appear once at a time in Split View, even though the system may show a duplicate of the same window for convenience.

Alternatives and Workarounds

If you need to show more than one piece of content but cannot adopt the full scene architecture (for example, because you must support iOS 12), consider these approaches:

  • Popover or modal containers. Present a secondary view controller as a popover on iPad; this keeps everything inside one window but gives a visual separation.
  • Custom container view controllers. Build a split‑view controller that hosts two child view controllers side‑by‑side. This mimics a multi‑window layout without creating separate scenes.
  • Universal Links to launch a new instance. Use a URL scheme that opens the app with a distinct NSUserActivity. iOS will treat it as a new scene if the manifest allows it, but on older systems it simply navigates within the same window.

These alternatives do not give true independent windows (each still shares the same process memory and lifecycle), but they can satisfy many design requirements when full scene support is not feasible.

Frequently Asked Questions

Can an iPhone display multiple windows of the same app?

Yes, starting with iOS 16 iPhone supports multiple windows in the app switcher, and developers can request new scenes programmatically. The windows appear as separate cards that the user can switch between.

Do all apps automatically get multi‑window capability?

No. An app must explicitly declare a scene configuration in its Info.plist and implement a scene delegate. Without that, the system treats the app as single‑scene only.

How does state restoration work with multiple windows?

Each scene receives its own UISceneSession and can store a NSUserActivity. When the system relaunches the app, it recreates each scene using the saved activity, allowing each window to restore its own content independently.

Will enabling multiple windows increase the app’s memory usage?

Each window creates its own view hierarchy and may load duplicate resources. If you open many windows simultaneously, memory consumption grows proportionally. It is advisable to share heavy assets (images, data caches) across scenes and release resources when a scene moves to the background.

Can a game use multiple windows for separate levels?

Games can technically create multiple scenes, but Apple’s GameKit and SpriteKit frameworks assume a single rendering surface. Managing multiple OpenGL/Metal contexts across windows adds complexity and is rarely recommended for typical games.

Is there a way to close a specific window from code?

Yes. Call UIApplication.shared.requestSceneSessionDestruction(_:options:errorHandler:) with the target UISceneSession. The system will dismiss that window while leaving other scenes intact.