Skip to content

ios: support the UIScene lifecycle - #4723

Open
molenick wants to merge 3 commits into
rust-windowing:masterfrom
molenick:uiscene-minimal
Open

molenick wants to merge 3 commits into
rust-windowing:masterfrom
molenick:uiscene-minimal

Conversation

@molenick

Copy link
Copy Markdown

Adds support for the UIScene lifecycle on iOS, unlocking winit support for apps built with the iOS 27 SDK.

iOS 27 refuses to launch apps built with its SDK unless they adopt the UIScene lifecycle by declaring a scene manifest in Info.plist. In apps that declare one, winit shows a blank screen: it creates its window before a scene exists and never attaches it to one.

Related: #4224

Changes

  • In apps with a scene manifest, can_create_surfaces is emitted once the first scene connects, instead of at launch.
  • New windows are attached to the connected scene.

Impact

  • Apps can declare a scene manifest and run on iOS 27. No scene delegate is needed.
  • Apps without a manifest are unaffected.
  • To preserve compatibility with older iOS versions, UIScene symbols are looked up at runtime instead of linked.

Testing

I wrote XCUITests that launch a winit app and check that its window appears, run with and without a scene manifest on the iOS 17, 26 and 27 simulators.

  • With a manifest, the window did not appear on iOS 17, 26 or 27 before this change, and now appears on all three.
  • Without a manifest, nothing changes: the app works on iOS 17 and 26, and iOS 27 refuses it as expected.

tvOS and visionOS are untested.

A backport to 0.30.13 is on uiscene-minimal-v0.30; happy to open a PR against v0.30.x if wanted.

  • Tested on all platforms changed (iOS simulator)
  • Added an entry to the changelog module if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality

@molenick
molenick requested a review from madsmtm as a code owner September 29, 2026 23:10

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

Development

Successfully merging this pull request may close these issues.

1 participant