Skip to content

fix(ios): Adopt the scene lifecycle without a manifest - #25687

Merged
ajpinedam merged 9 commits into
unoplatform:masterfrom
ajpinedam:dev/anpi/fix.ios.scene.lifecycle.master
Oct 27, 2026
Merged

ajpinedam merged 9 commits into
unoplatform:masterfrom
ajpinedam:dev/anpi/fix.ios.scene.lifecycle.master

Conversation

@ajpinedam

@ajpinedam ajpinedam commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

GitHub Issue: closes #25510

PR Type:

🐞 Bugfix

What changed? 🚀

Apps built with the version 27 SDKs (Xcode 27) must use the UIKit scene lifecycle, or iOS and tvOS 27 refuse to launch them: UIScene life cycle is required for apps built with this SDK. On master, only apps that declare a UIApplicationSceneManifest got the scene lifecycle. Apps without a manifest, which includes every existing app upgraded to 7.0, stayed on the app lifecycle and crashed at launch. Thanks to @mikernet for reporting this and pointing out the gap in master.

This PR adds a third lifecycle mode for apps without a manifest, next to the existing app lifecycle and manifest modes:

  • When it applies:
    • The scene lifecycle is adopted when the app is built with a version 27 SDK (DTPlatformVersion ≥ 27), whatever its .NET version, or when the SDK version can't be read.
    • The UnoUseSceneLifecycle Info.plist key overrides that in either direction.
    • Apps built with an older SDK keep the app lifecycle unless they opt in.
  • How it works:
    • UnoUIApplicationDelegate.GetConfiguration assigns the new internal AdoptedSceneDelegate to the application scene. Other roles, such as an external display, get no delegate, so UIKit keeps mirroring them.
    • The new internal AdoptedSceneBinder hosts the app's single window in that scene. The window is still created up front, as under the app lifecycle.
    • A scene that connects before the window exists is held for it. A disconnect keeps the window for the next scene instead of closing it.
    • UnoUISceneDelegate is unchanged for apps with a manifest. It's now also assigned when the manifest names no delegate class, as Uno 6.8 does.
  • Stable Objective-C name: AdoptedSceneDelegate is registered as UnoAdoptedSceneDelegate, the same name as the 6.8 fix. UIKit restores a saved scene session with the delegate class it was saved with, without calling GetConfiguration. When testing this PR, a build whose saved session named a class that exists but is the wrong delegate never got its window into a scene. Adding or removing a manifest in an app update doesn't run into this: on the iOS 27 simulator, UIKit then didn't reuse the saved class, whatever the manifest's configuration name. AdoptedSceneDelegate logs an error if it ever connects outside its mode.
  • Application delegate overrides: UIKit sends the URL, user activity, shortcut, and foreground/background callbacks to the scene delegate instead of the application delegate. In this mode they're forwarded to the application delegate, so overrides such as OpenUrl, ContinueUserActivity, PerformActionForShortcutItem, OnActivated and DidEnterBackground keep working.
    • Each forward is guarded on its own, so a throwing override doesn't skip Uno's handling that follows.
    • A shortcut's completion handler runs exactly once.
    • The activation the app was launched with is reported once its window is in the scene, so app code failing on it can't leave the app without its window.
  • Diagnostics: the mode is decided once from Info.plist by the new internal AppleUIKitLifecycle and the pure AppleUIKitLifecycleDecision. AppleUIKitLifecycle logs at startup which lifecycle the app runs and what decided it. It warns when UnoUseSceneLifecycle is neither a boolean nor a number, or the SDK version is unknown.
  • Changes in every mode:
    • A window ignores native visibility changes until it is shown, so Show() raises the first VisibilityChanged.
    • A failing UIKit callback is logged at Error with its name, and still raised as an unhandled exception.
    • Reading a scene role the bindings don't know no longer throws.
  • Tests and CI:
    • Given_Window.When_Scene_Lifecycle_Window_Hosted_In_Application_Scene checks the scene's delegate hosts the window. It's inconclusive under the app lifecycle.
    • Given_Window.When_Url_Opened_Then_Activation_Reported opens the SamplesApp's own URL scheme and waits for AppInstance.Activated. It's inconclusive on tvOS, which doesn't open an app's own URL. The SamplesApp shows no activation dialog for the URL's runtime-tests host.
    • Given_AppleUIKitLifecycleDecision (unit tests) covers the decision: the manifest first, then the key, then the SDK version, including versions it can't read.
    • The iOS SamplesApp declares a scene manifest. The tvOS one no longer does (its manifest came from fix(samplesapp): Adopt the scene lifecycle on tvOS #25661) and sets UnoUseSceneLifecycle, as CI still builds with Xcode 26.6, so CI's tvOS runtime tests run under AdoptedSceneDelegate.
    • Gaps: CI covers URL forwarding only in manifest mode, and no longer runs manifest mode on tvOS, whose only difference from iOS there is the missing shortcuts. The tvOS stage runs on PRs that touch Apple code.
  • Docs:
    • customizing-uiapplicationdelegate.md: new Scene lifecycle section, including how to see the startup log.
    • migrating-to-uno-7.md: the switch comes with the move to Xcode 27, not with the upgrade to 7.0.
    • protocol-activation.md: under the scene lifecycle, a cold-start activation arrives after OnLaunched.
    • windows-ui-xaml-window.md: small update.

The 6.8 counterpart is #25688.

The tvOS SamplesApp failed to launch on the xcode-27 runner (#25659) for the same reason (#25660). #25661 fixed that for the SamplesApp by giving it a scene manifest. This PR fixes it for apps that don't have one, and takes the tvOS SamplesApp's manifest back out so that CI runs that path.

Validation

  • Compile:
    • The iOS SamplesApp (net10.0-ios) and the tvOS one (net10.0-tvos) build.
    • The runtime project builds clean with analyzers and code-style enforcement on, for iOS and tvOS.
    • Uno.UI.UnitTests builds, with analyzers on for the test project.
    • A Release iOS SamplesApp, trimmed with MtouchLink=Full as on CI, builds.
    • Not built for net11.0 TFMs, since that SDK isn't available on the test machine.
  • Unit tests: the 17 Given_AppleUIKitLifecycleDecision cases pass. They ran on macOS, with the macOS ICU libraries copied into the output, which the test project only bundles for Windows.
  • Runtime, iOS 27 simulator (Xcode 27.1):
    • After the review fixes (e61b017), Given_Window has no failures with and without a manifest, in Debug and in the trimmed Release build.
    • Without a manifest, unmodified master crashes at launch. With this PR, Given_Window has no failures without a manifest, with one, and with one that names no delegate class.
    • The URL test passes in both modes. That covers warm URL forwarding to the application delegate.
    • UnoUseSceneLifecycle=false still fails to launch, as UIKit requires.
    • On iPad, manifest mode passes 19.
    • A background/foreground round trip keeps the same process and raises OnSuspending, then OnResuming.
    • A window created after an await in OnLaunched appears (checked before AdoptedSceneDelegate was split out).
  • Runtime, scene session restore:
    • Upgrading from the 6.8 fix to this PR, without a manifest, restores the saved session.
    • Adding or removing a manifest between versions works too, also with the manifest's configuration named Default Configuration.
  • Runtime, iOS 26.5 simulator:
    • Adopted mode: no failures.
    • App lifecycle (UnoUseSceneLifecycle=false): Given_Window matches, and the scene test is inconclusive.
    • OnSuspending/OnResuming are raised in the same order in both (checked before the split).
  • Runtime, tvOS 27 simulator: the SamplesApp, now without a manifest, runs the adopted mode and Given_Window has no failures. Before the rebase onto fix(samplesapp): Adopt the scene lifecycle on tvOS #25661, this branch's tvOS head had the same setup and all four CI tvOS shards passed.
  • Runtime, static registrar: UnoAdoptedSceneDelegate is registered, and both tests pass in both modes.

Not validated yet

  • A cold-start URL, which needs a tap on the system's "Open" prompt.
  • A custom application delegate's lifecycle overrides.
  • A physical device, NativeAOT, a forced scene disconnect/reconnect, and iPad window resizing. The disconnect change in 6002309 is checked by review only.

Open question for reviewers

The mode follows the SDK the app is built with. The alternative is to always adopt the scene lifecycle in 7.0, which would take the app lifecycle path out of play but change behavior for apps still built with Xcode 26.

Known, out of scope

  • In manifest mode, a window created after an await in OnLaunched shows a black screen ([iOS] Launch scene is destroyed when the initial Window is created after an await in OnLaunched #24812, reproduced while testing this PR).
  • GPU resources and the display link stay alive while a window is detached from its scene. This is pre-existing in every mode.
  • After a background launch, such as a silent push, the first trip to the foreground doesn't forward WillEnterForeground or raise Resuming, unlike the app lifecycle.

PR Checklist ✅

No API changes. The behavior only changes for apps built with a version 27 SDK, which couldn't launch before. For those, the launch URL, shortcut or user activity is no longer in FinishedLaunching's launch options; it reaches the forwarded overrides after OnLaunched instead. This is documented in the migration guide.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DtUZ4zXC6g5yoXN9Rdt2yx

@github-actions github-actions Bot added platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform area/skia ✏️ Categorizes an issue or PR as relevant to Skia area/automation Categorizes an issue or PR as relevant to project automation kind/documentation labels Oct 25, 2026
@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 241259 found UI Test snapshots differences: skia-linux-screenshots: 118, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 118 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • ClipboardTests.png-dark
    • Buttons.png-dark
    • Buttons.png
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • DisplayInformation.png-dark
    • ImageBrushAlignmentXY.png-dark
    • ImageBrushAlignmentXY.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • ImageIconPage.png-dark
    • ImageIconPage.png
    • DropDownButtonPage.png-dark
    • Examples.png
  • skia-windows-screenshots: 2458 changed over 2490

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedBackVisualSourceSamplePage.png
    • AppBarButtonWithIconTest.png-dark
    • AppBar_KeyBoard.png
    • ApplicationViewSpanningRectsPage.png-dark
    • AppWindowFeatures.png
    • AppXamlDefinedResources.png-dark
    • Attributed_text_Simple.png
    • AutoBorderStretchwithbottommargin.png
    • AutomationPropertiesExtensions_Role.png
    • AutomationProperties_AutomationId.png-dark
    • AutoSuggestBox_Icons.png-dark
    • AutoSuggestBox_Icons.png
    • BasicAutoSuggestBox.png-dark
    • BasicAutoSuggestBox.png
    • Basics_Automated.png-dark
    • Basics_Automated.png
    • BezierSegment.png-dark
    • BezierSegment.png
    • BitmapImage_vs_SvgImageSource.png-dark
    • BitmapImage_vs_SvgImageSource.png

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 241259 has failed on Uno.UI - CI.

@ajpinedam
ajpinedam force-pushed the dev/anpi/fix.ios.scene.lifecycle.master branch from baa6e6d to a49bb2d Compare October 25, 2026 15:10
@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 241265 found UI Test snapshots differences: skia-linux-screenshots: 118, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 118 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • Buttons.png-dark
    • Buttons.png
    • ClipboardTests.png-dark
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • DynamicFont.png-dark
    • DisplayInformation.png-dark
    • DynamicFont.png
    • DoubleImageBrushInList.png-dark
    • DropDownButtonPage.png-dark
    • DoubleImageBrushInList.png
    • Examples.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
  • skia-windows-screenshots: 2458 changed over 2490

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AndroidWindowInsets.png-dark
    • AnimatedBackVisualSourceSamplePage.png-dark
    • AnimatedVisualsTestbedPage.png
    • AppBarButtonWithIconTest.png-dark
    • Application_DispatcherShutdownMode.png-dark
    • ApplicationViewMode.png-dark
    • AppWindowPresenters.png
    • AppWindowClosing.png-dark
    • Attributed_text_FontSize_Changing.png-dark
    • AppWindowPositionAndSize.png-dark
    • AuthenticationBroker_Demo.png-dark
    • ArcSegment.png
    • AutoBorderStretchwithrightmargin.png-dark
    • AuthenticationBroker_Cancel.png
    • AutomationProperties_Name.png-dark
    • AutoBorderStretchwithtopmargin.png-dark
    • AutoSizedPathCentered.png-dark
    • AutomationProperties_Relations.png-dark
    • AutoSizedPathCentered.png
    • AutomationProperties_Relations.png

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 241265 has failed on Uno.UI - CI.

@ajpinedam
ajpinedam marked this pull request as ready for review October 26, 2026 11:42
@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 241383 found UI Test snapshots differences: skia-linux-screenshots: 118, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 118 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Buttons.png-dark
    • Buttons.png
    • ClipboardTests.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • DropDownButtonPage.png-dark
    • Examples.png
    • DisplayInformation.png-dark
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_Enumeration.png-dark
    • DynamicFont.png-dark
    • DynamicFont.png
  • skia-windows-screenshots: 2458 changed over 2490

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_ScreenReader.png-dark
    • AndroidWindowInsets.png-dark
    • AndroidWindowInsets.png
    • AnimatedIconPage.png-dark
    • AnimatedIconPage.png
    • AnimatedVisualsTestbedPage.png-dark
    • AppBarButtonTest.png
    • AppBarToggleButtonTest.png-dark
    • ApplicationViewMode.png-dark
    • ApplicationViewMode.png
    • AppWindowClosing.png-dark
    • AppWindowClosing.png
    • AppXamlDefinedResources.png-dark
    • AppXamlDefinedResources.png
    • Attributed_text_Supserscript.png-dark
    • Attributed_text_Supserscript.png
    • AutoBorderStretchwithbottommargin.png
    • AutoBorderStretchwithleftmargin.png-dark
    • AutomationProperties_Name.png-dark
    • AutomationProperties_Name.png

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 241383 has failed on Uno.UI - CI.

@ajpinedam
ajpinedam force-pushed the dev/anpi/fix.ios.scene.lifecycle.master branch from 7926541 to 3406657 Compare October 26, 2026 16:10
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 241450 found UI Test snapshots differences: skia-linux-screenshots: 118, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 118 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • DisplayInformation.png-dark
    • ClipboardTests.png-dark
    • DynamicFont.png-dark
    • DynamicFont.png
    • Examples.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_Enumeration.png-dark
    • DropDownButtonPage.png-dark
  • skia-windows-screenshots: 2458 changed over 2490

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedBackVisualSourceSamplePage.png-dark
    • AppBarButtonWithIconTest.png-dark
    • ApplicationViewSizing.png
    • AppWindowFeatures.png-dark
    • AppWindowTitleBar Properties.png
    • Arrange_Performance01.png-dark
    • Attributed_text_Supserscript.png-dark
    • AutoBorderStretchwithleftmargin.png
    • AutoBorderStretchwithtopmargin.png-dark
    • AutoBorderStretchwithtopmargin.png
    • AutomationProperties_Relations.png-dark
    • AutomationProperties_Relations.png
    • AutoSuggestBox_Keyboard.png-dark
    • AutoSuggestBox_Keyboard.png
    • BasicAutoSuggestBox.png-dark
    • BasicAutoSuggestBox.png
    • BasicThemeResources.png-dark
    • BasicThemeResources.png
    • BezierSegment.png-dark
    • BezierSegment.png

Apps built with the version 27 SDKs must use the UIKit scene lifecycle, or
iOS and tvOS 27 refuse to launch them. Apps without a scene manifest stayed
on the app lifecycle, so an existing app upgraded to 7.0 crashed at launch.

Uno now adopts the scene lifecycle for those apps when they are built with a
version 27 SDK, or when UnoUseSceneLifecycle is set in Info.plist, and logs
at startup which lifecycle the app runs and what decided it. The application
scene gets the internal AdoptedSceneDelegate, whose Objective-C name is fixed
and shared with 6.8, as UIKit restores saved scene sessions with it.
AdoptedSceneBinder hosts the app's single window, created up front as
before, in that scene: a scene that connects before the window exists is
held for it, and a disconnect keeps the window for the next scene instead of
closing it. The URL, user activity, shortcut, and foreground and background
callbacks UIKit now sends to the scene are forwarded to the application
delegate, each guarded on its own, so that its overrides keep working.

Apps with a manifest keep UnoUISceneDelegate, which is also assigned when
the manifest names no delegate class. In every mode, a window now ignores
native visibility changes until it is shown, so that Show() raises the first
VisibilityChanged, a failing UIKit callback is logged with its name as well
as raised as an unhandled exception, and a scene role the bindings don't
know no longer throws.

Refs unoplatform#25510

Claude-Session: https://claude.ai/code/session_01DtUZ4zXC6g5yoXN9Rdt2yx
One test checks the window is hosted by its scene's delegate. A second
opens the SamplesApp's own URL scheme and checks the activation is
reported; tvOS doesn't open an app's own URL, so it runs on iOS.

Refs unoplatform#25510

Claude-Session: https://claude.ai/code/session_01DtUZ4zXC6g5yoXN9Rdt2yx
The scene logging read typeof(T).Log() for both the level check and
the call, and each read takes the logger factory's lock. The logger is
now kept in a local variable. A scene role the bindings don't know now
logs the whole exception instead of its message.

Claude-Session: https://claude.ai/code/session_01DtUZ4zXC6g5yoXN9Rdt2yx
@ajpinedam
ajpinedam force-pushed the dev/anpi/fix.ios.scene.lifecycle.master branch from 3406657 to 7109271 Compare October 26, 2026 19:34
@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 241515 found UI Test snapshots differences: skia-linux-screenshots: 118, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 118 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ClipboardTests.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • Buttons.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • Examples.png
    • DisplayInformation.png-dark
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • DropDownButtonPage.png-dark
    • Gamepad_CurrentReading.png-dark
    • Gamepad_Enumeration.png-dark
  • skia-windows-screenshots: 2458 changed over 2490

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedBackVisualSourceSamplePage.png
    • AndroidWindowInsets.png-dark
    • AppWindowClosing.png
    • AppBarButtonTest.png
    • AppXamlDefinedResources.png-dark
    • AppBar_KeyBoard.png-dark
    • Attributed_text_Simple.png-dark
    • ApplicationViewSpanningRectsPage.png
    • AuthenticationBroker_Demo.png
    • AppWindowPositionAndSize.png-dark
    • AutomationProperties_AutomationId.png
    • ArcSegment.png-dark
    • AutoSizedPathCentered.png
    • AuthenticationBroker_Demo.png-dark
    • AutoSizedTopLeft.png
    • AutoBorderStretchwithrightmargin.png-dark
    • AutoSuggestBox_Icons.png-dark
    • AutomationProperties_Landmark.png-dark
    • AutoSuggestBox_Icons.png
    • AutomationProperties_Landmark.png

@ajpinedam
ajpinedam enabled auto-merge October 26, 2026 23:55

@Xiaoy312 Xiaoy312 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The adopted-scene path is the fix for #25510, but CI never runs it: both SamplesApp heads declare a manifest, so the two new tests exercise UnoUISceneDelegate. The 6.8 counterpart sets UnoUseSceneLifecycle on one head for exactly this reason. Could the tvOS head drop the manifest added in #25661? It sets UIApplicationSupportsMultipleScenes=false and only existed to launch on Xcode 27, which this PR now handles. Separately, making Decide() a pure function of (manifest, key value, SDK version) would let a unit test cover the decision cases.

The tvOS SamplesApp has declared a scene manifest since unoplatform#25661, so
neither head ran the scene lifecycle Uno adopts for apps without one,
which is the fix for unoplatform#25510. The tvOS head now has no manifest and sets
UnoUseSceneLifecycle, as CI still builds it with an SDK older than 27,
so its runtime tests run under the adopted scene delegate.

The scene test also fails, instead of carrying on as if the app used
the scene lifecycle, when it can't find UsesSceneLifecycle, for
instance once trimmed.

Refs unoplatform#25510

Claude-Session: https://claude.ai/code/session_01DtUZ4zXC6g5yoXN9Rdt2yx
The SamplesApp shows a dialog for an activation into the running app,
which on iOS is a native alert that CloseAllPopups doesn't close. The
URL test now opens a runtime-tests URL, for which the SamplesApp shows
none.

Refs unoplatform#25510

Claude-Session: https://claude.ai/code/session_01DtUZ4zXC6g5yoXN9Rdt2yx
The decision now lives in AppleUIKitLifecycleDecision, a pure function
of the scene manifest's presence, UnoUseSceneLifecycle and the SDK
version. It has no Apple types, so Uno.UI.UnitTests links it like the
other runtime helpers and tests the decision table.

Refs unoplatform#25510

Claude-Session: https://claude.ai/code/session_01DtUZ4zXC6g5yoXN9Rdt2yx
UIKit normally moves a scene to the background before disconnecting
it. A scene that disconnects without doing so, such as one connected by
a background launch, left the app counted as in the foreground, so the
next scene entering the foreground wasn't forwarded to the application
delegate. Checked by review only, as the simulator can't produce that
order on demand.

Refs unoplatform#25510

Claude-Session: https://claude.ai/code/session_01DtUZ4zXC6g5yoXN9Rdt2yx
UIKit restores a scene session with the delegate it was saved with, but
on the iOS 27 simulator it didn't reuse it once an app update added or
removed a scene manifest, whatever the configuration name. If it ever
does, the adopted scene delegate connects in a lifecycle where nothing
gives it the window, so it now logs an error.

Refs unoplatform#25510

Claude-Session: https://claude.ai/code/session_01DtUZ4zXC6g5yoXN9Rdt2yx
@ajpinedam

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Both points are in:

  • tvOS head: 858b55c removes the manifest and SceneDelegate that fix(samplesapp): Adopt the scene lifecycle on tvOS #25661 added, and sets UnoUseSceneLifecycle, since CI still builds with Xcode 26.6, where the default would be the app lifecycle. The tvOS runtime tests now run under AdoptedSceneDelegate. Before I rebased onto fix(samplesapp): Adopt the scene lifecycle on tvOS #25661, this branch had the same setup and all four tvOS shards passed. Two gaps remain:
    • CI covers URL forwarding only in manifest mode, as the URL test is inconclusive on tvOS and the iOS head keeps its manifest. I checked the adopted path on the iOS 27 simulator.
    • Manifest mode no longer runs on tvOS, where it differs from iOS only by the missing shortcuts.
  • Decide(): eb229fc moves it to AppleUIKitLifecycleDecision, which has no Apple types, so Uno.UI.UnitTests links it like MacOSTitleBarMath.cs. Given_AppleUIKitLifecycleDecision has 17 cases covering the order (manifest, then key, then SDK version), the version 27 cutoff and unreadable versions.

I've updated the PR description to match.

@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 241682 found UI Test snapshots differences: skia-linux-screenshots: 118, skia-windows-screenshots: 2458

Details
  • skia-linux-screenshots: 118 changed over 2458

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ClipboardTests.png-dark
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • Buttons.png-dark
    • Buttons.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • CompositionEffectBrush.png-dark
    • CompositionEffectBrush.png
    • CompositionNineGridBrush_Source_Changes.png-dark
    • CompositionNineGridBrush_Source_Changes.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • DropDownButtonPage.png-dark
    • DisplayInformation.png-dark
    • DynamicFont.png-dark
    • DynamicFont.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • ImageBrushAlignmentXY.png-dark
  • skia-windows-screenshots: 2458 changed over 2492

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_ScreenReader.png-dark
    • AndroidWindowInsets.png-dark
    • AndroidWindowInsets.png
    • AnimatedBackVisualSourceSamplePage.png
    • AnimatedIconPage.png
    • AnimatedVisualsTestbedPage.png
    • AppBarButtonTest.png
    • AppBarButtonWithIconTest.png
    • AppBarToggleButtonTest.png
    • AppBar_KeyBoard.png-dark
    • ApplicationViewSizing.png-dark
    • ApplicationViewSizing.png
    • AppWindowClosing.png-dark
    • AppWindowClosing.png
    • AppXamlDefinedResources.png-dark
    • AppXamlDefinedResources.png
    • AuthenticationBroker_Cancel.png-dark
    • AuthenticationBroker_Cancel.png
    • AutomationProperties_Landmark.png-dark
    • AutomationProperties_Landmark.png

@ajpinedam

Copy link
Copy Markdown
Contributor Author

/azp run Uno.UI - docs

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@ajpinedam ajpinedam added the 7.0 PRs only. For issues, use the Release field. label Oct 27, 2026
@mergify

mergify Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@ajpinedam
ajpinedam merged commit fece5c2 into unoplatform:master Oct 27, 2026
59 checks passed
@unodevops

Copy link
Copy Markdown
Contributor

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

Labels

7.0 PRs only. For issues, use the Release field. area/automation Categorizes an issue or PR as relevant to project automation area/skia ✏️ Categorizes an issue or PR as relevant to Skia kind/documentation platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build and run tvOS on xcode-27 runner images [iOS] Apps without a scene manifest fail to launch on iOS 27 when built with Xcode 27

5 participants