Repository navigation
[iOS/MacCatalyst] Adopt scene lifecycle and AppActions dispatch - #38601
Conversation
Apps generated from the MAUI templates use the legacy application-delegate lifecycle and fail at startup when built with the Xcode 27 SDKs. UIKit now requires scene adoption. MAUI already implements scene-based window creation and lifecycle delivery, but the templates do not declare the matching scene configuration or a registered application scene delegate. Add complete UIApplicationSceneManifest declarations and explicitly registered SceneDelegate subclasses of MauiUISceneDelegate to all eight Apple app heads across maui, maui-blazor, maui-blazor-web, and maui-multiproject. Use __MAUI_DEFAULT_SCENE_CONFIGURATION__ and keep UIApplicationSupportsMultipleScenes false so adoption does not silently enable multiple windows or Mac Catalyst window tabbing. Leave existing application delegates, splash configuration, and unrelated plist values unchanged; do not duplicate the framework's Window lifecycle forwarding. The Mac Catalyst 27 SDK also rejects the existing 15.0 app deployment target. Set the four Mac Catalyst app-template defaults explicitly to 17.0 (macOS 14), while preserving the iOS and class-library 15.0 minima. Document that new apps use this default even with older SDKs and that lower deployment targets require a compatible 26.x SDK. Add 11 generated-template integration cases covering the four families, sample/empty options, and multi-project platform exclusions. Install the exact candidate package into a fresh owned hive for each case. Validate the complete plist structure, duplicate keys, native delegate contract, preserved values, and Mac Catalyst app minimum. Keep the existing DotnetInternal.New behavior when no custom hive is supplied. Document scene migration, package-specific test execution, and the separate existing Core/Essentials AppActions scene-dispatch limitation. Verification: - Reproduced the exact UIKit startup failure using .NET 10.0.401, MAUI 10.0.101, and Apple SDK packages 27.0.10710. - Confirmed the original native binary links SDK 27, fails on iOS 27, and still launches on iOS 26.5. - Built and launched all eight generated Apple application heads. - Verified sample-content startup and fully trimmed Release startup on iOS 27 and 26.5, plus two native Mac close/reopen cycles. - All 11 final package regression cases pass. The original package fails the nine applicable cases; the scene-only package fails eight Mac minimum cases. - Fully trimmed builds report the same 78 pre-existing warnings before and after the fix. Android's full build is blocked by a missing JDK; its post-filter source exclusions were verified. Windows was not run. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b434e275-e79b-4c6b-a676-b914ea93ca24
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 38601Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 38601" |
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
🟡 Changes recommended
The manifest tests need DTD-safe XML loading, and the README guidance needs correction.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Updates .NET MAUI iOS and Mac Catalyst templates for UIKit scene lifecycle support with Xcode 27, raises Mac Catalyst app targets to 17.0, and adds regression coverage.
Changes:
- Adds scene manifests and registered
MauiUISceneDelegateclasses. - Adds isolated template-package testing.
- Documents migration and deployment requirements.
Review findings: Critical — AppleTemplateManifestTests cannot load the DOCTYPE-bearing plists with default DTD handling. Nit — README guidance should distinguish application launch options from scene activation data.
File summaries
| File | Reviewed changes |
|---|---|
src/TestUtils/src/Microsoft.Maui.IntegrationTests/Utilities/DotnetInternal.cs |
Adds isolated template hives and package installation support. |
src/TestUtils/src/Microsoft.Maui.IntegrationTests/AppleTemplateManifestTests.cs |
Validates generated manifests, delegates, exclusions, and deployment targets; DTD handling requires correction. |
src/Templates/src/templates/maui-multiproject/MauiApp.1.Mac/SceneDelegate.cs |
Adds the registered Mac Catalyst scene delegate. |
src/Templates/src/templates/maui-multiproject/MauiApp.1.Mac/MauiApp.1.Mac.csproj |
Sets the Mac Catalyst target to 17.0. |
src/Templates/src/templates/maui-multiproject/MauiApp.1.Mac/Info.plist |
Adds the single-scene manifest. |
src/Templates/src/templates/maui-multiproject/MauiApp.1.iOS/SceneDelegate.cs |
Adds the registered iOS scene delegate. |
src/Templates/src/templates/maui-multiproject/MauiApp.1.iOS/Info.plist |
Adds the single-scene manifest. |
src/Templates/src/templates/maui-mobile/Platforms/MacCatalyst/SceneDelegate.cs |
Adds the Mac Catalyst scene delegate. |
src/Templates/src/templates/maui-mobile/Platforms/MacCatalyst/Info.plist |
Adds the scene configuration. |
src/Templates/src/templates/maui-mobile/Platforms/iOS/SceneDelegate.cs |
Adds the iOS scene delegate. |
src/Templates/src/templates/maui-mobile/Platforms/iOS/Info.plist |
Adds the scene configuration. |
src/Templates/src/templates/maui-mobile/MauiApp.1.csproj |
Sets the Mac Catalyst target to 17.0. |
src/Templates/src/templates/maui-blazor/Platforms/MacCatalyst/SceneDelegate.cs |
Adds the Mac Catalyst scene delegate. |
src/Templates/src/templates/maui-blazor/Platforms/MacCatalyst/Info.plist |
Adds the scene configuration. |
src/Templates/src/templates/maui-blazor/Platforms/iOS/SceneDelegate.cs |
Adds the iOS scene delegate. |
src/Templates/src/templates/maui-blazor/Platforms/iOS/Info.plist |
Adds the scene configuration. |
src/Templates/src/templates/maui-blazor/MauiApp.1.csproj |
Sets the Mac Catalyst target to 17.0. |
src/Templates/src/templates/maui-blazor-solution/MauiApp.1/Platforms/MacCatalyst/SceneDelegate.cs |
Adds the Mac Catalyst scene delegate. |
src/Templates/src/templates/maui-blazor-solution/MauiApp.1/Platforms/MacCatalyst/Info.plist |
Adds the scene configuration. |
src/Templates/src/templates/maui-blazor-solution/MauiApp.1/Platforms/iOS/SceneDelegate.cs |
Adds the iOS scene delegate. |
src/Templates/src/templates/maui-blazor-solution/MauiApp.1/Platforms/iOS/Info.plist |
Adds the scene configuration. |
src/Templates/src/templates/maui-blazor-solution/MauiApp.1/MauiApp.1.csproj |
Sets the Mac Catalyst target to 17.0. |
src/Templates/README.md |
Documents scene migration and testing; launch-option guidance needs clarification. |
Review details
Suppressed comments (1)
src/Templates/README.md:49
- This guidance is inaccurate for MAUI's current lifecycle implementation:
MauiUIApplicationDelegate.FinishedLaunchingstill invokesiOSLifecycle.FinishedLaunchingwithlaunchOptions(seesrc/Core/src/Platform/iOS/MauiUIApplicationDelegate.cs:58-74). Please distinguish those application launch options from scene-specific activation data, which should be read fromUISceneConnectionOptions.
Existing apps need both the manifest and delegate in each Apple app head. MAUI already forwards scene events to the cross-platform `Window` lifecycle events; do not add duplicate forwarding to `SceneDelegate`. Custom platform lifecycle handlers must use the corresponding scene callbacks for activation and backgrounding. Launch options are no longer passed to `FinishedLaunching`; read activation data from the scene connection options instead. See [Apple's migration guidance](https://developer.apple.com/documentation/technotes/tn3187-migrating-to-the-uikit-scene-based-life-cycle).
- Files reviewed: 23/23 changed files
- Comments generated: 1
- Review effort level: Lite
| <string>UIInterfaceOrientationLandscapeLeft</string> | ||
| <string>UIInterfaceOrientationLandscapeRight</string> | ||
| </array> | ||
| <key>UIApplicationSceneManifest</key> |
There was a problem hiding this comment.
🤖 UIApplicationDelegate.PerformActionForShortcutItem for scene-based apps, but EssentialsMauiAppBuilderExtensions still forwards AppActions only through that application-delegate callback.
MauiUISceneDelegate currently neither implements windowScene:performActionForShortcutItem:completionHandler: for an existing scene nor consumes connectionOptions.ShortcutItem when connecting a scene. An app configured with AddAppAction / OnAppAction can therefore display its shortcuts without delivering their activation to the registered handler.
The description acknowledges this as separate work, but making scenes the default exposes that gap to users of all four template families. Please make the Core/Essentials scene-aware forwarding fix a shipping prerequisite, with warm- and cold-start regression coverage, rather than leaving it as an independent follow-up. This should be handled centrally, not duplicated in each template delegate.
There was a problem hiding this comment.
Agreed: scene-aware AppActions forwarding is included as a shipping prerequisite, not deferred. dffde8fa8b adds the central warm scene callback and per-scene cold delivery after the receiving window's activation callbacks; template delegates remain empty. The legacy application-delegate path is retained.
The before/after native tests established the missing behavior: cold cases reached Created and Activated but not AppAction, and warm cases lacked the selector. After the fix, all 6 native Core cases passed, including reconnection, no stale closed-window delivery, main-thread completion, and legacy dispatch. The Essentials suite had 251 passed, 0 failed, 1 skipped. These are native API-dispatch tests on iOS 26.5, not a claim of Mac Catalyst Home Screen UI coverage.
The latest follow-up, 35432d159a, also removes duplicate test-host forwarders, migrates the logging-only observer, and fixes the full-suite dispatcher-lifetime failure in the new unit-test fixture. The PR description now reflects the integrated runtime fix and its validation boundaries.
This comment has been minimized.
This comment has been minimized.
Address the review requirement that default scene adoption must ship with working AppActions, rather than leave shortcut delivery as separate work. UIKit stops calling the application-delegate shortcut selector for scene apps; the runtime was missing both the warm scene entry point and cold connection-option delivery. Add the real scene shortcut export using the UIKit protocol model's PerformAction(UIWindowScene, UIApplicationShortcutItem, Action<bool>) signature. Matching only the Objective-C selector was insufficient: native regression tests caught block-to-delegate conversion failure with the initial UIOperationHandler signature. Keep that existing delegate type at the application boundary and adapt it through normal managed dispatch. Record the new virtual method in both Apple API baselines. Route real scene and legacy application callbacks through the existing managed lifecycle registrations. Keep the Core/Essentials bridge central, including Mac Catalyst, without adding forwarding to template delegates. Queue cold shortcuts per scene, clear pending state before activation callbacks, then dispatch through the same window's revalidated services. Disconnect, failed initialization, reconnect, and window replacement cannot replay or reroute stale actions. Give each lifecycle handler a one-shot acknowledgement. Invoke all synchronous handlers before publishing success; thereafter first true determines the result, while false requires all replies. Marshal native completion to the main thread exactly once. Preserve synchronous handler exceptions and cancellation; if failure completion also throws, surface both failures in order instead of masking the original. Fix Essentials' ignored completion argument for recognized, unhandled, unsubscribed, conversion-failure, and throwing-handler paths. Keep the pending native shortcut strongly owned until delivery, using a narrowly justified field-level memory annotation rather than a lossy weak reference. Add neutral completion tests and native warm/cold, reconnection, closed-window, main-thread, and legacy callback regressions. Native fixtures use real connected scenes and handler-backed windows, restore global state, and retain the SDK protocol call so ABI failures remain observable. Make the existing Current setter internal only for scoped friend-test restoration; leave production constructor behavior intact. Make plist parsing explicitly ignore DTD declarations with no resolver, and test external-DTD and entity behavior. The review's claim that XDocument.Load(string) always prohibits DOCTYPE did not reproduce; these tests establish the actual hardening policy instead. Clarify that FinishedLaunching still runs and forwards UIKit-provided options, while scene activation data arrives through scene connection options/callbacks. Verification: - Before: four native Core dispatch failures after verified real window readiness, plus six native Essentials completion-count failures. - After: Core native 6/6 pass; Essentials native 251 pass, 0 fail, 1 skip. - Completion helper: 21/21 pass; template/plist policy: 13/13 pass. - iOS and Mac Catalyst Core/Essentials source builds pass with all applicable API, platform, and memory analyzers enabled, 0 warnings/errors. - Native tests ran on an isolated iOS 26.5 simulator. Source libraries were built with Apple 26 targeting packs/Xcode 26.5; SDK 27 test hosts used the verified source-built references and supported minimum 15.0. No SDK-validation checks or product deployment settings were disabled. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b434e275-e79b-4c6b-a676-b914ea93ca24
Main advanced with the ScrollView content-offset fix while the AppActions review follow-up was being validated. Resolve the two additive conflicts in the iOS and Mac Catalyst PublicAPI.Unshipped files by retaining both the upstream ScrollViewHandler.PlatformArrange declaration and the new MauiUISceneDelegate.PerformAction declaration. Keep both histories intact. No rebasing, squashing, or force-pushing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b434e275-e79b-4c6b-a676-b914ea93ca24
This comment has been minimized.
This comment has been minimized.
GPT-only adversarial and empirical reviewReviewed head Assessment: no new high-confidence changed-line defect retained at this head. This is not an unconditional merge recommendation: required device-test CI is red and UI CI is still running. No approval or request-changes review was submitted. What was exercisedActual TRX/xUnit results, not inferred from test attributes or the runner's summary:
All executed cases in these runs passed. The two recorded skips were an Android-only Essentials case and Blazor's external-service-dependent test (#33927). Some requested category filters ran broader sets; the table reports what actually executed. The second Core iOS run repeated the same 15 cases and is not counted twice. The adversarial checks covered repeated warm actions, cold delivery after window activation, disconnect/reconnect state, closing the window during activation, asynchronous completion acknowledgements, exception paths, multiple URL contexts, and duplicate host forwarding. Template tests generated 11 template variants and exercised two plist-loading policies. These are template generation/contract tests, not a claim that every generated application was built and run. The title/description match the inspected implementation, including the MacCatalyst template minimum of 17.0. Native interaction evidenceThese are real screenshots and recordings of a small source-built diagnostic client referencing this PR's framework projects, not mockups or a generated-template app. Counters and timestamps come from actual callbacks. Framework implementation files were not modified.
iOS screenshots: warm delivery, cold activation, and the cold/warm URL boundary
Android screenshots: repeated warm delivery, cold shortcut, and cold URL
Android: real launcher shortcuts and warm URL delivery pr38601-android-shortcuts-and-url.mp4iOS: warm SpringBoard shortcut pr38601-ios-warm-shortcut.mp4iOS: cold SpringBoard shortcut, followed by the measured activation/action log pr38601-ios-cold-shortcut.mp4Screenshots and clips include separate runs. Clips are native captures encoded as H.264; they do not by themselves prove native completion-handler timing or end-to-end OAuth success. CI: still a merge gateSnapshot as of 2026-09-18 13:23:18 UTC:
The device-test failure was followed beyond the PowerShell exit-code wrapper:
Coverage limitsLocal tooling was .NET SDK 10.0.113, Android workload 36.1.115, Apple workloads 26.0.11017, and host Xcode 26.6 on macOS 26.6.2. The Apple workload expects Xcode 26.0, so the documented version-check override was required. This is not Xcode 27 validation. MacCatalyst's 15 automated cases ran successfully, and the diagnostic app built, but interactive Mac UI/media were not run because the required launch approval was unavailable. No Mac screenshots/videos are claimed. Physical devices, minimum-supported-OS coverage, full identity-provider authentication, associated-domain universal links, and the full scene/window matrix remain outside this run. |
Tests Failure Analysis
🧪 CI Analysis — click to expand📋 SummaryOverall verdict: Inconclusive The observed device/UI failures have matching 📊 Pipeline coverageThis is a fresh CI assessment of
The September 18 device retry reran Android CoreCLR and Windows only. Successful Android Mono/iOS/MacCatalyst results retained from September 17 belong to this same build and same source version, not an older PR head. Superseded CoreCLR attempt 1 is separated from the current 36-work-item totals. 🔎 Failure attribution
The three photo-picker matches are deliberately cited to the earlier main task log, not falsely labeled final failed main results: all three later passed on main. Conversely, they passed the PR job's first execution and then failed its final execution, so this PR's four-failure Android result is not cleared by those earlier passes. The Android device result is a completed assertion failure, not evidence of a native crash: the Controls XML contains all 993 selected cases (980 passed, 1 failed, 12 skipped; zero errors), and XHarness explicitly reports 📋 Recovered attemptsAndroid CoreCLR attempt 1 failed Shell cancellation: the retained complete execution reports 322 passed, 13 not executed, and the one Issue26598 timeout. In the following test-process retry, Issue26598 actually passed at 13:57:25 UTC, and 237 passes were logged before cancellation at the 180-minute job limit. The retry has no complete replacement TRX; Additional whole-job and within-job recoveries were kept separate from persistent failures:
The other 58 named failed occurrences across 15 ultimately succeeded UI tasks each have both a later console pass and an actual published Passed result. The table below is an inventory by owning lane, not a claim that its tests share one cause. Same-SHA recovery is not standalone evidence of unrelatedness.
📋 Previous-run comparisonRequested the previous five completed builds per definition on the exact recorded branch
For device-test attribution, the five bounded main samples were 1601791, 1601687, 1600801, 1600092, and 1599657. All five reproduce the Windows SDK diagnostic; the CoreCLR ScrollView assertion is observed in 1600801 and passes in the other four. This is a diagnostic/setup comparison, not an inference from overall green/red status. For UI attribution, the separate five pre-start main builds were 1601988 ( 🔬 Code and regression-test evidenceThe full pinned 50-file diff was available separately from the collector's truncated patch. The relevant production changes concern Apple scene lifecycle, AppActions completion/dispatch, WebAuthenticator callbacks, and template scene manifests; there are also Apple headless-runner and additive shared lifecycle-completion changes. Platform/file separation is supporting context only, not the reason a failure is called unrelated. Apple scene changes can affect app startup and activation, so the Mac WebView/Shell failures were not dismissed on area labels. Their actual failing commands, stacks and setup were compared with main: Release Mono, Actual current-build results confirm meaningful execution of the changed tests:
Passing these cases does not establish complete UI coverage or remove the missing Windows execution. 📋 Coverage and limitationsCoverage: Incomplete. Windows has no executed device cases, and the canceled Shell retry has no complete final results. The published Shell test-run state being Limitations: same-branch history is only 3/5 main, 2/5 device, and 0/5 UI runs. Historical main timeline snapshots were capped by the collector, and 1600285's old failed-result collection is incomplete; neither is used as a clean-history or unrelatedness claim. Current main/UI timelines and current device result completeness were independently checked, and the truncated PR patch was supplemented by the full pinned diff. Historical device Apple failures without a current matching failure were not exhaustively re-investigated. This assessment uses current service evidence and the pinned diff; it does not inherit the earlier report's conclusions or count earlier local/native testing as this CI run. Known-issue labels and prior PR failures were leads, not standalone causal evidence. No source changes, new local/native executions, or CI reruns were performed for this assessment. 🧭 Follow-up — actions and refreshNext action
Keep the matching main-branch ScrollView, photo-picker, snapshot and WebView diagnostics tracked separately; the evidence does not justify attributing those existing signatures to this PR or updating snapshot baselines as a shortcut.
|
|
/backport to release/10.0.1xx-sr11 |
|
Started backporting to |
…ppActions dispatch (#38664) Backport of #38601 to release/10.0.1xx-sr11 /cc @kubaflo @dalexsoto Co-authored-by: Alex Soto <alex@alexsoto.me> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: b434e275-e79b-4c6b-a676-b914ea93ca24
|
This bit us today. Can anyone shed some light on how to be notified of these completely breaking changes proactively? How does one know when a seemingly innocuous MAUI workload update will cause an app to simply crash on start on iOS 27+? |
|
My understanding is Apple did this. Did an Xcode update cause it? |
…pdate bug-report versions (#40154) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- Open .NET 11 fix PRs against net11 for review; target main for next-major features. After approval, a maintainer manually retargets the fix PR to the active inflight branch and merges it directly there. Do not merge individual fixes into net11. Bots must not retarget or merge. Candidate integration into net11 and release/* changes are separate, explicitly coordinated release work. --> ### Description of Change ### 1. Scene lifecycle support - Enable UIKit scene lifecycle support in the Controls Sandbox and UI-test HostApp for iOS and Mac Catalyst. - This follows #38601, which updated application templates and framework lifecycle forwarding but did not migrate these existing apps. - Scene adoption is required when apps built with SDK 27 run on platform 27. **Changes:** - Add registered `SceneDelegate` subclasses deriving from `MauiUISceneDelegate`. - Configure `UIApplicationSceneManifest` using MAUI's default scene configuration and matching delegate registration. - Keep multiple-scene support disabled. - Update the iOS required device capability from `armv7` to `arm64`, matching the .NET 11 GA template. Deployment targets, SDK versions, package references, and existing application startup code remain unchanged. ##### Compatibility with existing UI-test environments - Apple apps are built with Xcode 27, while iOS UI-test execution defaults to Xcode 26.5 on Tahoe agents. The CoreCLR `latest` simulator lane currently selects iOS 18.5. - Scene lifecycle APIs are available on older supported runtimes. Existing execution environments are therefore expected to remain compatible, without changing deployment targets or CI toolchain settings. - The iOS `arm64` capability does not require iOS 27 or affect Mac Catalyst. It excludes only 32-bit-only iOS devices, which are already outside the supported OS range. - Compatibility remains subject to CI validation, particularly startup, window creation, lifecycle behavior, and screenshot baselines. - No passing CI result for these changes is claimed yet. ### 2. Bug-report template update - Add the published .NET MAUI 11.0.10 release to both version dropdowns: - Release Notes: https://github.com/dotnet/maui/releases/tag/11.0.10 Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>







Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description of Change
Adopt UIKit's scene-based lifecycle in all .NET MAUI application templates so newly generated iOS and Mac Catalyst apps can launch when built with the Xcode 27 SDKs.
This also fixes a separate build incompatibility found during validation: the .NET Mac Catalyst 27 SDK rejects the templates' existing
SupportedOSPlatformVersionof15.0, requiring at least17.0.Root Cause
UIKit now requires scene lifecycle adoption for apps built with the 27 SDKs. The original generated app compiled successfully but terminated after the splash screen with:
MAUI already has the required runtime implementation:
MauiUIApplicationDelegateselects scene startup whenUIApplicationSceneManifestis present and returns__MAUI_DEFAULT_SCENE_CONFIGURATION__.MauiUISceneDelegatecreates the scene-backed MAUI window for that configuration.Windowevents.The templates were missing the manifest configuration and an explicitly registered application scene delegate; the existing framework already supplies window creation and cross-platform
Windowlifecycle forwarding.Review also identified a shipping prerequisite: enabling scenes changes AppActions delivery. UIKit does not call the application-delegate shortcut selector for scene-based apps, and the previous runtime had neither a warm scene shortcut callback nor a cold scene shortcut consumer. This PR now includes the central Core/Essentials forwarding fix rather than deferring that regression.
Implementation
mauimaui-blazormaui-blazor-webmaui-multiprojectUIApplicationSceneManifestto all eight Apple app plists, with oneUIWindowSceneSessionRoleApplicationconfiguration named__MAUI_DEFAULT_SCENE_CONFIGURATION__.[Register("SceneDelegate")]subclass ofMauiUISceneDelegatein each app head, matchingUISceneDelegateClassName.UIApplicationSupportsMultipleScenestofalse. Scene adoption is required; multiple-window support remains opt-in.SupportedOSPlatformVersion17.0.AppleTemplateManifestTestsand isolated template-package installation support toDotnetInternal.Generated application delegates, entry points, splash screens, orientation declarations, device families, icon values, and dependency pins are unchanged.
Central AppActions Forwarding
windowScene:performActionForShortcutItem:completionHandler:export toMauiUISceneDelegate. Its public virtual managed signature isPerformAction(UIWindowScene, UIApplicationShortcutItem, Action<bool>), matching the UIKit protocol model so native block-to-delegate conversion works. Both Apple public API baselines include that member.iOSLifecycle.PerformActionForShortcutItemregistrations beneath the real application and scene entry points. Core/Essentials remains the single integration point; template delegates stay empty.Window.Activatedthrough that same window's current services. Disconnect, failed initialization, reconnect, and window replacement cannot replay or reroute a stale action.truedetermines success, whilefalserequires all replies. An early unhandled Essentials response cannot preempt an asynchronous custom handler.Currentsetter becomes internal solely to permit friend-test fixtures to restore global state around a normally constructed delegate; no public setter or alternate production constructor is added.The pending shortcut uses an intentionally strong, bounded value-object reference, with a field-only memory-analyzer justification. Weakening it could lose the cold action before activation; hiding the reference or disabling the analyzer is not a substitute.
Warm Scene Authentication Callbacks
The follow-up to the scene URL/user-activity feedback adds the missing Essentials subscriptions for
SceneOpenUrlandSceneContinueUserActivity.WebPageUrlvalues into the same URI-basedWebAuthenticator.Default.OpenUrlbackend used by the existing application-level Platform adapters.__IOS__; the problem is missing scene subscriptions, not a need to broaden that guard.Scope: this preserves externally delivered callbacks for custom authenticators implementing
IPlatformWebAuthenticatorCallback. The built-in modernASWebAuthenticationSessionpath already receives its result through the authentication session's own completion handler; this change does not claim that normal flow was broken. It is not general application deep-link navigation and does not replay URLs or activities from cold scene connection options. Applications handling their own links still need the corresponding scene handlers, even with multiple windows disabled.Compatibility and Scope
The startup model changes for newly generated Apple apps: legacy application-delegate lifecycle becomes scene lifecycle, while the default remains one window.
The Mac Catalyst app deployment default changes: new apps target Mac Catalyst
17.0/ macOS 14, including when generated for use with an older SDK. This is the minimum accepted by the .NET Mac Catalyst 27 SDK; it is independent of scene API availability. Apps requiring Mac Catalyst 15.0/16.0 must use a compatible 26.x SDK and explicitly choose that deployment target.The iOS app minimum remains
15.0. The class-library template also retains its15.0minimum: it does not produce an app bundle, and the unchanged library was built successfully with the validation workload.Template changes do not retrofit existing applications. Existing apps must add the corresponding manifest and delegate and migrate any custom platform lifecycle or launch-option handling.
Shortcut lifecycle registrations must acknowledge individually. This is a MAUI fan-out contract, not an Apple-imposed deadline. Existing logging-only observers that relied on another registration owning the raw native callback must now invoke their own callback with
false. A handler can reply asynchronously after returning; returning alone is not an acknowledgement. If nobody reportstrue, a registration that never replies leaves native completion pending. Automaticfalseat return or an arbitrary timeout would reject valid delayed responses, so neither is introduced.Regression Coverage
The 11-case theory generates projects from the selected packed template, not directly from source plists. Each case installs that package into a fresh, owned template hive.
Coverage includes default/sample/empty configurations across all four template families, a Blazor Web option combination, and explicit multi-project iOS, Mac, Android, and Windows selections. Assertions verify:
MauiUISceneDelegatesubclass and included/excluded Apple app heads.17.0.CI selects the exact artifact corresponding to
MAUI_PACKAGE_VERSION; there is no timestamp-based or stale-cache fallback.MAUI_TEMPLATE_TEST_PACKAGEpermits an explicit local package path for A/B verification without modifying the global template cache. ExistingDotnetInternal.Newcalls retain their prior behavior when no custom hive is supplied.The plist loader now explicitly uses
DtdProcessing.IgnoreandXmlResolver = null, with two focused policy tests. The review's assertion thatXDocument.Load(string)always prohibits DOCTYPE did not reproduce: the original real plists already loaded successfully. The explicit policy nevertheless prevents DTD entity expansion and external resolution, and is tested on that basis rather than claiming a false baseline failure.Additional runtime coverage includes 22 platform-neutral completion tests, native scene tests exercising real connected
UIWindowScene/handler-backed windows and the UIKit protocol entry, a real legacy application-delegate test with scoped state restoration, and direct Essentials completion/error/collision cases. The warm native test caught a real block-marshalling failure in the first callback signature; it was fixed in production rather than bypassed with a managed-only test call.Validation
Native reproduction used .NET SDK 10.0.401, MAUI 10.0.101, Apple SDK packages 27.0.10710, and Xcode 27.0. Template packaging and integration-test compilation also used the repository-provisioned SDK.
15.0Validation limitations: the full Android build was blocked by the local machine's missing JDK (
XA5300), and Windows was not built on this Mac. Fully trimmed builds produce 78 identical pre-existing warnings with and without this change; these were compared rather than suppressed. Local execution results above do not imply that PR CI has passed.Review Follow-up Validation
Created/Activatedbut not AppAction, warm cases lacked the native selector1, actual0The follow-up native runs used an isolated iOS 26.5 simulator. Product libraries were source-built with the repository's Apple 26 targeting packs and installed Xcode 26.5; the test-only hosts used SDK 27/Xcode 27, an explicit supported test-host minimum of 15.0, and those verified source-built references. Product deployment settings and SDK validation were not disabled to make the tests pass. Baseline and candidate artifacts were kept distinct. This is API-dispatch coverage, not a claim of Mac Catalyst Home Screen quick-action UI support.
September 17 Review and CI Corrections
ConfigureTestBuilderhelpers. Both use the default builder, which already registers Core/Essentials forwarding. Adjacent URL and user-activity hooks remain unchanged. Completion coalescing does not prevent duplicate AppAction delivery, so the duplicate registrations themselves are removed.falseafter logging. It must not useLogEvent'struereturn value to claim that the action was handled.MauiApp.CreateBuilder(useDefaults: false). These tests need lifecycle services, not global UI/dispatcher bootstrap. The default builder caused cross-suiteObjectDisposedExceptionfailures involvingDispatcherProviderStub'sThreadLocal, reproducing the actual Release Helix failures on this PR.UseEssentialsandConfigureTestBuilder)The native negative controls restored only the two original helper files, verified byte-for-byte against the published source, and used unchanged runtime/test inputs. The fixes were then restored and the native runs repeated. The sample's inline callback was reviewed, but its full local SDK 27 build remains blocked by the sample's pre-existing iOS 13.0 deployment minimum (SDK 27 requires 15.0); that unrelated sample setting was not changed or bypassed. These local results do not claim that the automated Mac Catalyst review gate or a new PR CI run has completed successfully.
Scene URL/User-Activity Follow-up Validation
NSUrlvalues for empty/all-unhandled/mixed-handled sequences and processing every URL after an earlier success.UIOpenUrlContextis fabricated. The tests do not claim a browser login or a system-generated nonempty URL-context end-to-end run.CS9336integration compile failure did not reproduce with that SDK.Native Mac Catalyst Validation
The follow-up to the Mac Catalyst execution request runs the actual device-test apps on macOS 27,
maccatalyst-arm64, rather than counting iOS execution or successful compilation as Mac evidence.This exposed two test-host problems. The Essentials Mac app had no scene manifest and was rejected by UIKit when built with SDK 27; XHarness returned zero without a connected test protocol or result XML, which was not treated as a pass. After scene adoption, the headless runner's existing window was not associated with the real scene, and tests could start before scene readiness. That caused ten Screenshot/WindowStateManager failures and timing-dependent Core scene precondition failures.
The correction stays in test infrastructure:
MauiTestSceneDelegatefor the Core and Essentials Mac hosts. It attaches the existing application-owned headless window to UIKit's actualUIWindowScene, preserves its controller, makes it visible, and signals readiness.false, exactly-once completion, main-thread completion, and no AppActions event through the SDK protocol entry point.Final fresh-process results, repeated after the readiness correction:
All relevant results were checked in fresh XML; no test was skipped to conceal a failure. The Mac test apps use SDK 27/Xcode 27 and an explicit test-host minimum of 17.0 with source-built Apple 26 product references. Shared runner and app builds have zero warnings/errors, with no SDK-validation bypass or fake SDK stamp. The new readiness gate applies only to Core/Essentials among current scene-configured device hosts; Controls, Graphics, BlazorWebView, and the runner sample have no Mac scene manifest and retain immediate readiness.
These are native API-dispatch, marshalling, lifecycle, and UI-context tests. They do not claim a macOS Home Screen quick-action invocation surface or an OS-originated cold quick-action launch. The test hosts' multi-scene configuration is also not a substitute for the separately tested single-scene application-template policy.
Non-blocking Documentation and Contract-Coverage Follow-up
The follow-up to the non-blocking review suggestions changes only XML documentation and one unit test:
SceneOpenUrlandSceneContinueUserActivitydelegates and fluent registrations. Connection-option URLs/activities remain available throughSceneWillConnectand are not automatically replayed. Handoff activities can arrive separately through the continuation callback after connection, so that API is not labeled strictly warm-only.FalseAndSilentHandlersDoNotCompleteOnReturn: one registration acknowledgesfalse, a second is verified to run without acknowledging, and aggregate completion remains pending when dispatch returns. It uses the existing isolated builder and no sleeps, timeout, or intentionally awaited pending task.0, actual1. Restore the helper byte-for-byte afterward; no mutation is shipped. This proves the synchronous contract, not the absence of every possible future timer.There is no runtime behavior, callback signature, or public API baseline change in this follow-up.
Scene-Fixture Keyboard-Observer Isolation
The replacement iOS device runs exposed an order-dependent test-fixture regression: four existing Entry cursor tests failed after the new AppActions scene fixture. Calling the real scene
WillConnectraisesOnPlatformWindowCreated, whose default adapter installs process-wide keyboard observers. Disposing the fixture restored its windows and application globals but left those observers installed.The correction is confined to
AppActionsLifecycleTests.iOS.cs. Its non-input scene fixture temporarily sets the existingShouldDisconnectLifecycleopt-out only around synchronousWillConnect, restoring the exact previous value infinally. It does not disconnect existing observers, reset keyboard state, alter production keyboard behavior, or bypass window creation,Created, activation, or native shortcut dispatch.Four native theory cases cover both initial lifecycle preferences and both unseeded/explicitly connected observer states. They verify the window-created callback, exact flag restoration, and identity preservation of all five observer tokens after connection and disposal. Test cleanup removes only subscriptions created by that test; pre-existing subscriptions are left intact.
Validation used fresh processes and actual XML:
The temporary ordering test, tracing, and owned simulator were removed. The attempted full Mac suite timed out without final XML and is not counted as passed; the fresh focused Mac run above completed successfully. The file-based verification wrapper stopped at its uncommitted-file guard before changing files or running tests; it did not report
VERIFICATION PASSED. The controlled before/after native experiment supplies the regression evidence.Separate pre-existing coverage limitation: the Entry cursor tests can return without asserting cursor geometry when keyboard visibility is not observed. Restoring fixture isolation returns them to their prior behavior; their green results are not proof of keyboard-scrolling coverage. That test-host/coverage issue is not hidden with extra waits or bundled into this fixture correction.
Important Constraints and Follow-up
UISceneStoryboardFileor add duplicateWindowlifecycle forwarding to the template delegate.Action<bool>signature aligned with the UIKit protocol; matching only the Objective-C selector is insufficient for block conversion.UIWindowScenewhen scene-specific handling is required.Issues Fixed
Fixes the launch-at-splash failure of newly generated .NET MAUI Apple apps when built with the Xcode 27 SDKs, and the Mac Catalyst app-template deployment-target build failure found while validating that scenario.
The original report is tracked privately; no public GitHub issue is linked.