Skip to content

feat(core): swiftui lifecycle boot apps to use standard notification observers for windows - #11345

Open
NathanWalker wants to merge 1 commit into
mainfrom
feat/swiftui-lifecycle-window-observers
Open

feat(core): swiftui lifecycle boot apps to use standard notification observers for windows#11345
NathanWalker wants to merge 1 commit into
mainfrom
feat/swiftui-lifecycle-window-observers

Conversation

@NathanWalker

Copy link
Copy Markdown
Contributor
  • Proven more reliable than .onReceive, particularly when main window reconstructs in different use cases

@NathanWalker NathanWalker added this to the 9.1 milestone Aug 2, 2026
@nx-cloud

nx-cloud Bot commented Aug 2, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit d715894

Command Status Duration Result
nx test apps-automated -c=android ✅ Succeeded 4m 2s View ↗
nx run-many --target=test --configuration=ci --... ✅ Succeeded <1s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-08-03 19:59:00 UTC

@NathanWalker
NathanWalker force-pushed the feat/swiftui-lifecycle-window-observers branch 3 times, most recently from 4218c94 to d715894 Compare August 3, 2026 19:35
…observers for windows

Replace the process-global flag and discarded observer tokens with NativeScriptWindowCommandCoordinator, which owns the NotificationCenter tokens and registers them once per process. The SwiftUI environment actions (openWindow, dismissWindow, openImmersiveSpace, dismissImmersiveSpace) are rebound on every appearance so commands always dispatch through actions from the current scene rather than ones captured at first launch. Documents the boot-ordering guarantee that observers are installed before the JS runtime can post its first window command, and deletes the unused force-cast parseWindowInfo in favor of a single optional-safe parser.
@NathanWalker
NathanWalker force-pushed the feat/swiftui-lifecycle-window-observers branch from d715894 to b3ca006 Compare August 3, 2026 19:52
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