Skip to content

fix(samplesapp): Adopt the scene lifecycle on tvOS - #25661

Merged
ramezgerges merged 1 commit into
unoplatform:masterfrom
ramezgerges:dev/rara/tvos-scene-manifest
Oct 26, 2026
Merged

ramezgerges merged 1 commit into
unoplatform:masterfrom
ramezgerges:dev/rara/tvos-scene-manifest

Conversation

@ramezgerges

Copy link
Copy Markdown
Contributor

GitHub Issue: closes #25660

PR Type:

🐞 Bugfix

What changed? 🚀

Apps built with the tvOS 27 SDK must adopt the UIScene lifecycle, or UIKit stops them at launch ("UIScene life cycle is required for apps built with this SDK", SIGTRAP). SamplesApp's iOS head already does. The tvOS head didn't, so every tvOS runtime test shard of #25492 (the .NET 11 rc.2 / Xcode 27 update) dies before running a test.

The tvOS head now matches the iOS head:

  • Platforms/tvOS/SceneDelegate.tvOS.cs: a [Register("SceneDelegate")] subclass of UnoUISceneDelegate.
  • A UIApplicationSceneManifest in Platforms/tvOS/Info.plist, with the same configuration name and delegate class as iOS, and a single scene since tvOS has no multiple windows.

This has no effect on the current Xcode 26 builds, beyond running tvOS through the scene lifecycle as iOS already does.

Validation

On the PR #25492 head, with Xcode 27.1, the tvOS 27.0 simulator ("Apple TV 4K (3rd generation)", as in CI) and the net11.0-tvos Release build CI uses:

  • Without this change: the app exits at launch with the UIScene error above, matching the CI crash reports.
  • With it: the app launches, and Given_Border runs: 28 passed, 0 failed.

The fix only shows up on a clean build: an incremental build kept the previously bundled Info.plist without the manifest.

Apps without a scene manifest in general are tracked separately by #25510, which applies to tvOS 27 too.

PR Checklist ✅

🤖 Generated with Claude Code

Apps built with the tvOS 27 SDK fail to launch without a scene manifest.
The tvOS head now registers a scene delegate like the iOS head does.

Fixes unoplatform#25660

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@github-actions github-actions Bot added the area/automation Categorizes an issue or PR as relevant to project automation label Oct 23, 2026
@unodevops

Copy link
Copy Markdown
Contributor

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

@unodevops

Copy link
Copy Markdown
Contributor

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

@ramezgerges
ramezgerges enabled auto-merge October 26, 2026 15:46
@mergify

mergify Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@ramezgerges
ramezgerges merged commit 42be556 into unoplatform:master Oct 26, 2026
50 checks passed
ajpinedam added a commit to ajpinedam/uno that referenced this pull request Oct 27, 2026
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
jonpryor added a commit to unoplatform/uno.templates that referenced this pull request Nov 11, 2026
Context: 1bdc4ef
Context: https://developer.apple.com/documentation/technotes/tn3187-migrating-to-the-uikit-scene-based-life-cycle
Context: https://learn.microsoft.com/en-us/dotnet/maui/ios/uikit-scene-lifecycle?view=net-maui-10.0
Context: unoplatform/uno#25510
Context: unoplatform/uno#25661

iOS 27 requires adoption of "the UIKit scene-based life cycle", and
.NET for iOS in .NET 11 in turn requires this change.

On CI, `reactorapp_MacOS.csproj` fails to build:

	Platforms/iOS/Info.plist : error MT7199: The app's Info.plist does not contain a UIApplicationSceneManifest dictionary.
	  Apps built with the iOS or Mac Catalyst 27.0 SDK or later must use the UIKit scene lifecycle or they will crash at launch on iOS or macOS 27.0 or later.
	  Add a scene manifest and scene delegate, and migrate custom lifecycle handlers as described at https://aka.ms/uiscene.
	  To skip this build-time validation, set the MSBuild property ValidateSceneManifest to false; this does not disable the operating system's requirement.
	  [/Users/runner/work/uno.templates/uno.templates/reactorapp_MacOS/reactorapp_MacOS.csproj::TargetFramework=net11.0-ios]

Update `unoapp-reactor` to contain the required
`UIApplicationSceneManifest` dictionary in `Info.plist`, and add a
`SceneDelegate` implementation.

This mirrors a similar change in 1bdc4ef.

Update `unoapp/MyExtensionsApp.1` to contain the required
`SceneDelegate` and related infrastructure for tvOS as well.
(It's not failing yet, but the PR hasn't tried *building* it yet,
so it's presumably only a matter of time…)

Finally, update the `UISceneConfigurationName` value for iOS to
`__UNO_DEFAULT_SCENE_CONFIGURATION__`.  This matches what was done
in unoplatform/uno#25661 and "mirrors" the MAUI documentation, which
uses `__MAUI_DEFAULT_SCENE_CONFIGURATION__`.
agneszitte pushed a commit to unoplatform/uno.templates that referenced this pull request Nov 11, 2026
Context: 1bdc4ef
Context: https://developer.apple.com/documentation/technotes/tn3187-migrating-to-the-uikit-scene-based-life-cycle
Context: https://learn.microsoft.com/en-us/dotnet/maui/ios/uikit-scene-lifecycle?view=net-maui-10.0
Context: unoplatform/uno#25510
Context: unoplatform/uno#25661

iOS 27 requires adoption of "the UIKit scene-based life cycle", and
.NET for iOS in .NET 11 in turn requires this change.

On CI, `reactorapp_MacOS.csproj` fails to build:

	Platforms/iOS/Info.plist : error MT7199: The app's Info.plist does not contain a UIApplicationSceneManifest dictionary.
	  Apps built with the iOS or Mac Catalyst 27.0 SDK or later must use the UIKit scene lifecycle or they will crash at launch on iOS or macOS 27.0 or later.
	  Add a scene manifest and scene delegate, and migrate custom lifecycle handlers as described at https://aka.ms/uiscene.
	  To skip this build-time validation, set the MSBuild property ValidateSceneManifest to false; this does not disable the operating system's requirement.
	  [/Users/runner/work/uno.templates/uno.templates/reactorapp_MacOS/reactorapp_MacOS.csproj::TargetFramework=net11.0-ios]

Update `unoapp-reactor` to contain the required
`UIApplicationSceneManifest` dictionary in `Info.plist`, and add a
`SceneDelegate` implementation.

This mirrors a similar change in 1bdc4ef.

Update `unoapp/MyExtensionsApp.1` to contain the required
`SceneDelegate` and related infrastructure for tvOS as well.
(It's not failing yet, but the PR hasn't tried *building* it yet,
so it's presumably only a matter of time…)

Finally, update the `UISceneConfigurationName` value for iOS to
`__UNO_DEFAULT_SCENE_CONFIGURATION__`.  This matches what was done
in unoplatform/uno#25661 and "mirrors" the MAUI documentation, which
uses `__MAUI_DEFAULT_SCENE_CONFIGURATION__`.

(cherry picked from commit 4a4629d)
agneszitte pushed a commit to unoplatform/uno.templates that referenced this pull request Nov 11, 2026
Context: 1bdc4ef
Context: https://developer.apple.com/documentation/technotes/tn3187-migrating-to-the-uikit-scene-based-life-cycle
Context: https://learn.microsoft.com/en-us/dotnet/maui/ios/uikit-scene-lifecycle?view=net-maui-10.0
Context: unoplatform/uno#25510
Context: unoplatform/uno#25661

iOS 27 requires adoption of "the UIKit scene-based life cycle", and
.NET for iOS in .NET 11 in turn requires this change.

On CI, `reactorapp_MacOS.csproj` fails to build:

	Platforms/iOS/Info.plist : error MT7199: The app's Info.plist does not contain a UIApplicationSceneManifest dictionary.
	  Apps built with the iOS or Mac Catalyst 27.0 SDK or later must use the UIKit scene lifecycle or they will crash at launch on iOS or macOS 27.0 or later.
	  Add a scene manifest and scene delegate, and migrate custom lifecycle handlers as described at https://aka.ms/uiscene.
	  To skip this build-time validation, set the MSBuild property ValidateSceneManifest to false; this does not disable the operating system's requirement.
	  [/Users/runner/work/uno.templates/uno.templates/reactorapp_MacOS/reactorapp_MacOS.csproj::TargetFramework=net11.0-ios]

Update `unoapp-reactor` to contain the required
`UIApplicationSceneManifest` dictionary in `Info.plist`, and add a
`SceneDelegate` implementation.

This mirrors a similar change in 1bdc4ef.

Update `unoapp/MyExtensionsApp.1` to contain the required
`SceneDelegate` and related infrastructure for tvOS as well.
(It's not failing yet, but the PR hasn't tried *building* it yet,
so it's presumably only a matter of time…)

Finally, update the `UISceneConfigurationName` value for iOS to
`__UNO_DEFAULT_SCENE_CONFIGURATION__`.  This matches what was done
in unoplatform/uno#25661 and "mirrors" the MAUI documentation, which
uses `__MAUI_DEFAULT_SCENE_CONFIGURATION__`.

(cherry picked from commit 4a4629d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[tvOS] SamplesApp fails to launch when built with the tvOS 27 SDK (no UIScene adoption)

5 participants