| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
When the runtime is reloaded in-process (NativeScriptRuntime.reloadApplication, used for OTA soft reboots) the app re-runs main in a fresh JS isolate while the process stays alive. iOSApplication.run() sees a live UIApplication and routes to runAsEmbeddedApp() - The previous UIWindow was deallocated along with the old isolate (it was retained only by the JS-side SceneDelegate._window), and sceneWillConnectToSession — which creates the window — does not re-fire on a reload. getWindow() then returned null and runAsEmbeddedApp() bailed early, leaving a black screen. - With no embedder delegate (NativeScript owns the UIApplication), the new root was presented modally over the old, now-dead root controller instead of replacing it — leaking the old controller on every reload and breaking when an overlay is mid-presentation. runAsEmbeddedApp() now: - recreates a window bound to the active UIWindowScene when none is found (initWithWindowScene + _setWindowForScene/_setupWindowForScene); - moves the rootViewController guard into the embedder-only branch, since a freshly recreated window has no controller yet; - replaces the window root via setWindowRootView() for the NativeScript-owned case instead of modal-presenting over the stale root.
|
View your CI Pipeline Execution ↗ for commit 6c1479b
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at 2026-07-20 20:58:27 UTC |
Sorry, something went wrong.
|
✅ Action performed
Review finished.
|
Sorry, something went wrong.
|
Looking for one thing? Review this PR in Change Stack to search files, summaries, diffs, and code without losing your place. 📝 WalkthroughWalkthroughThis PR updates embedded NativeScript app initialization to handle missing UIWindow by recreating it bound to an active UIWindowScene, tolerate null root view controller during startup, and adjust view attachment strategies based on embedder presence versus direct owning-app mode. ChangesEmbedded app window initialization
Suggested labels♥ community PR 🚥 Pre-merge checks | ✅ 5 ✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches 📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. ❤️ ShareComment @coderabbitai help to get the list of available commands and usage tips. |
Sorry, something went wrong.
There was a problem hiding this comment.
Actionable comments posted: 1
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: f2c1c242-f3f7-48bd-9baf-36cfebc2086a
📥 CommitsReviewing files that changed from the base of the PR and between 71d2203 and bcb87c9.
📒 Files selected for processing (1)
Sorry, something went wrong.
Co-authored-by: Nathan Walker <walkerrunpdx@gmail.com>
| Back | FazBrowse Home | New Git URL |
When the runtime is reloaded in-process (NativeScriptRuntime.reloadApplication, used for OTA soft reboots) the app re-runs main in a fresh JS isolate while the process stays alive. iOSApplication.run() sees a live UIApplication and routes to runAsEmbeddedApp()
runAsEmbeddedApp() works same as before but now supports this use case:
Supports 9.1 runtime features for OTA installed hot reloading of runtime isolates.