Skip to content

iOS multi-window: empty UISceneConfigurations crashes on launch on the iOS 27 SDK (NoSceneLifecycleAdoption) #15719

Description

@EllenGYY

Page

https://v2.tauri.app/learn/mobile-multiwindow/ — source src/content/docs/learn/mobile-multiwindow.mdx

Problem

The page instructs adding UIApplicationSceneManifest with an empty UISceneConfigurations:

<key>UISceneConfigurations</key>
<dict/>

On the iOS 27 SDK (Xcode 27), an app built with an empty UISceneConfigurations crashes at launch:

EXC_BREAKPOINT (SIGTRAP)
___UIApplicationEvaluateRuntimeIssueForNoSceneLifecycleAdoption_block_invoke
-[UIApplication workspace:didCreateScene:withTransitionContext:completion:]

This makes the documented multi-window setup unlaunchable when built against the iOS 27 SDK.

Scope note: Apple's UIScene lifecycle adoption began as non-fatal warnings under the iOS 26 SDK and becomes a hard launch trap under iOS 27. I verified the crash on an iOS 27 device built with Xcode 27; I have not tested the iOS 26 SDK, so I can't confirm whether 26 traps or only warns.

Root cause

iOS 27 enforces a launch-time UIScene-adoption validator (_UIApplicationEvaluateRuntimeIssueForNoSceneLifecycleAdoption). It inspects only the static Info.plist manifest and does not credit tao's programmatic application:configurationForConnectingSceneSession:options: (which vends a UISceneConfiguration named TaoScene with delegate class TaoSceneDelegate at runtime). With an empty UISceneConfigurations, the validator concludes the app has not adopted scenes and traps — even though tao is adopting them correctly at runtime.

Fix

Declare a static scene configuration that names tao's delegate class:

<key>UIApplicationSceneManifest</key>
<dict>
  <key>UIApplicationSupportsMultipleScenes</key><true/>
  <key>UISceneConfigurations</key>
  <dict>
    <key>UIWindowSceneSessionRoleApplication</key>
    <array>
      <dict>
        <key>UISceneConfigurationName</key><string>Default Configuration</string>
        <key>UISceneDelegateClassName</key><string>TaoSceneDelegate</string>
      </dict>
    </array>
  </dict>
</dict>

Notes:

  • UISceneDelegateClassName must be exactly TaoSceneDelegate — tao's Objective-C runtime class name (from #[name = "TaoSceneDelegate"] in tao/src/platform_impl/ios/scene.rs).
  • UIApplicationSupportsMultipleScenes must be a real boolean <true/>; tao's multiple_scenes_enabled() reads this key and only then attaches the scene delegate method.
  • tao's programmatic path still runs and takes precedence; the static entry exists only to satisfy the launch-time validator (and is a valid fallback, since it points at the same class).

Environment

  • Tauri 2.11 (tao 0.35), Xcode 27, iOS 27 device (aarch64), release build.
  • Separately, tao 0.35.3 needs the configurationForConnectingSceneSession autorelease fix from fix(ios): use autorelease_ptr to fix UISceneConfiguration crash tao#1245 (already on dev) to get past an earlier EXC_BAD_ACCESS on launch; this docs issue is about the distinct scene-adoption trap that remains after that.

Verified empirically on an iOS 27 device: empty <dict/> → traps on launch; the static config above → launches. Happy to open a PR against mobile-multiwindow.mdx.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    🪵 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions