Title: fix(ios): re-attach root view after in-process runtime reload by NathanWalker · Pull Request #11261 · NativeScript/NativeScript · GitHub
Open Graph Title: fix(ios): re-attach root view after in-process runtime reload by NathanWalker · Pull Request #11261 · NativeScript/NativeScript
X Title: fix(ios): re-attach root view after in-process runtime reload by NathanWalker · Pull Request #11261 · NativeScript/NativeScript
Description: 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() works same as before but now supports this use case: 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 Supports 9.1 runtime features for OTA installed hot reloading of runtime isolates.
Open Graph Description: 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.r...
X Description: 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.r...
Opengraph URL: https://github.com/NativeScript/NativeScript/pull/11261
X: @github
Domain: Github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:8b563686-9749-c58b-fe28-52eae53c6eda |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B1E0:1BAFD1:9D25C5:E0D764:6A638564 |
| html-safe-nonce | 4c5e7284612f70bb67f92f2b7bf9853ce163de9d2ee10c0ffeff7b4b28c73d12 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUUwOjFCQUZEMTo5RDI1QzU6RTBENzY0OjZBNjM4NTY0IiwidmlzaXRvcl9pZCI6IjU0MDA3MjA5NzgyMzc5ODc3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 890ed0c77c42a56fdf4f220b0d1f3b3580bda0c8f9509a371259c42c0bf411dd |
| hovercard-subject-tag | pull_request:3813610358 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/NativeScript/NativeScript/pull/11261/files |
| twitter:image | https://avatars.githubusercontent.com/u/457187?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/457187?s=400&v=4 |
| og:image:alt | 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.r... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | e4fb64aef87da454ec25b158147f7f5f14aef29216e5ca1612c2e48faa599d1f |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 31492490 |
| octolytics-dimension-repository_nwo | NativeScript/NativeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31492490 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/NativeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e839936ba5faffb9c836dda1cf4729d50c88a32e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width