Skip to content

research(ios): adopt the UIScene life cycle for iOS 27 SDK builds - #1265

Draft
AnthonyRonning wants to merge 4 commits into
research/tauri-2.12from
research/ios-scene-lifecycle
Draft

AnthonyRonning wants to merge 4 commits into
research/tauri-2.12from
research/ios-scene-lifecycle

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Why

Apps built with the iOS 27 SDK must adopt UIKit's scene-based life cycle, or UIKit aborts them at launch before any app code runs (EXC_BREAKPOINT in _UIApplicationEvaluateRuntimeIssueForNoSceneLifecycleAdoption). Reproduced with today's Research build stamped as iOS 27.1 SDK on the iPhone Duo simulator. App Store Connect requires the iOS 27 SDK from April 2027, and the iPhone Duo only runs apps full screen when they are built with the iOS 27.1 SDK. So this has to land before the Xcode 27.1 bump in the next PR.

What

  • src-tauri/Info.ios.plist adds UIApplicationSceneManifest with a single scene and tao's TaoSceneDelegate. tauri-cli merges it into the generated iOS plist, so macOS's shared Info.plist stays untouched. UIApplicationSupportsMultipleScenes is false: tao 0.37 creates one WebView window, and an extra scene on iPad or the Duo's inner display would render black.
  • Swift plugin entry points become public, which Xcode 27 release builds need to link (Tauri 2.12.3 made the same change for its own Swift package, [bug] [ios] Release build fails to link on Xcode 27: SwiftPM's default build system gives non-public @_cdecl functions local visibility tauri-apps/tauri#16130).
    • The in-tree IAP plugin.
    • tauri-plugin-sign-in-with-apple 1.0.2, vendored unmodified first, then the one-word fix. It has had no release since 2024.
  • The vendored tao carries fix(ios): emit Opened for URLs delivered on cold start tauri-apps/tao#1376. In the scene life cycle, a URL that cold-launches the app arrives in the scene connection options, which tao 0.37 ignores. Without it, an OAuth callback that relaunches Maple never reaches tauri-plugin-deep-link. Backported onto 0.37.1; only the import context differs from upstream dev.

Validation

Built with today's Xcode 26.5 pin through scripts/ci/ios-pr.sh. The bundle carries the merged manifest (UISceneDelegateClassName = TaoSceneDelegate).

  • CI: ci-ok passes. A one-off ci:ios label added research-ios, which built the iOS app with this change on today's Xcode 26.5; the label is removed again. None of this PR's files selected that lane. PR #1266 adds them to research-ios's paths.
  • iPhone 17 Pro on iOS 26.5, and iPhone Duo on iOS 27.1 (compatibility mode): the app launches.
    • A cloud.opensecret.maple://… URL that cold-launches it reaches the deep-link plugin (getCurrent() returns it).
    • A URL sent while it runs fires deep-link-received.
  • Before the tao backport: the same scene-mode build returned null for the cold-start URL, while the shipped, scene-less build received it.
  • Xcode 27.1 build of the full stack: the same checks pass on the Duo, iOS 26.5 and iOS 27.0. Details in PR #1266.

Still needs a real device: Sign in with Apple and StoreKit purchase/manage flows under the scene life cycle.

Notes

  • Rebased on master after the CI rewrite; the changes are unchanged.
  • iOS 26 SDK builds behave the same with the manifest (validated above), so this is safe on the current Xcode 26.5 CI.
  • The upstream deep-link fix is still an open PR. Drop the backport when Tauri ships a tao release that contains it.

🤖 Generated with Claude Code

@AnthonyRonning AnthonyRonning changed the title research/ios scene lifecycle research(ios): adopt the UIScene life cycle for iOS 27 SDK builds Oct 25, 2026
@AnthonyRonning
AnthonyRonning force-pushed the research/ios-scene-lifecycle branch from df76b74 to 7df88b2 Compare October 25, 2026 00:40
AnthonyRonning and others added 4 commits October 29, 2026 02:36
Apps built with the iOS 27 SDK must adopt the scene-based life cycle or
UIKit aborts at launch (_UIApplicationEvaluateRuntimeIssueForNoSceneLifecycleAdoption).
tauri-cli merges src-tauri/Info.ios.plist into the generated iOS plist, so
the manifest stays out of the shared Info.plist that macOS also uses.

One scene only: tao 0.37 creates a single WebView window, and any extra
scene iPad or iPhone Duo opened would have no WebView and render black.
The delegate is tao's TaoSceneDelegate. iOS 26 SDK builds behave the same
with the manifest, so this lands before the Xcode 27.1 bump.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Patch it from an in-tree copy so the next commit can fix its Swift entry
point for Xcode 27. The copy omits the crate's pnpm lockfile, the Gradle
cache files it ships and its build-generated permission files, which are
ignored the same way as in plugins/tauri-plugin-iap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Xcode 27 release builds need @_cdecl plugin entry points to be public for
the Rust bindings to link; Tauri 2.12.3 did the same for its own Swift
package (tauri-apps/tauri#16130). Covers the in-tree IAP plugin and the
vendored Sign in with Apple plugin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the scene life cycle, UIKit hands a launch URL to the connecting scene's
connection options and never calls scene:openURLContexts: for it. tao 0.37
ignores those options, so a deep link that starts Maple (for example an OAuth
callback after iOS killed the app) never reached tauri-plugin-deep-link.

Backports tauri-apps/tao#1376 onto the vendored tao 0.37.1 (only the import
context differs from upstream dev).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AnthonyRonning AnthonyRonning added the ci:ios Run the iOS build on this PR label Oct 29, 2026
@AnthonyRonning
AnthonyRonning force-pushed the research/ios-scene-lifecycle branch from 7df88b2 to ddd929b Compare October 29, 2026 03:12
@AnthonyRonning AnthonyRonning removed the ci:ios Run the iOS build on this PR label Oct 29, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant