Title: fix(ios): guard interactiveContentPopGestureRecognizer for apps built with pre-26 SDKs by edusperoni · Pull Request #11313 · NativeScript/NativeScript · GitHub
Open Graph Title: fix(ios): guard interactiveContentPopGestureRecognizer for apps built with pre-26 SDKs by edusperoni · Pull Request #11313 · NativeScript/NativeScript
X Title: fix(ios): guard interactiveContentPopGestureRecognizer for apps built with pre-26 SDKs by edusperoni · Pull Request #11313 · NativeScript/NativeScript
Description: PR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it. You have signed the CLA. All existing tests are passing: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/DevelopmentWorkflow.md#running-unit-tests-application. Tests for the changes are included - https://github.com/NativeScript/NativeScript/blob/master/tools/notes/WritingUnitTests.md. What is the current behavior? The iOS 26 support added for UINavigationController.interactiveContentPopGestureRecognizer gates the property access purely on the runtime OS version (SDK_VERSION >= 26): if (SDK_VERSION >= 26) { navigationController.interactiveContentPopGestureRecognizer.enabled = owner.enableSwipeBackNavigation; } interactiveContentPopGestureRecognizer only exists in the iOS 26 SDK. When an app is built with an older Xcode/SDK (e.g. Xcode 16 / iOS 18 SDK) but run on iOS 26+, that property is absent from the NativeScript-generated ObjC metadata — metadata is derived from the build SDK's headers, not the runtime OS. So the property access returns undefined, and setting .enabled on it throws: TypeError: Cannot set properties of undefined (setting 'enabled') crashing the app on the first page navigation. This was hit in real CI: an app built with Xcode 16 running on the iOS 26.2 simulator (NativeScript/angular CI). What is the new behavior? Guard the interactiveContentPopGestureRecognizer access with an existence check in addition to the runtime version check, so it is only touched when the property is actually present in the metadata: if (SDK_VERSION >= 26 && navigationController.interactiveContentPopGestureRecognizer) { ... } This mirrors the guard already used in _updateEnableSwipeBackNavigation, making iOS 26 runtime safe for apps built with pre-26 SDKs. The legacy interactivePopGestureRecognizer lines are unchanged (that API exists on all supported versions).
Open Graph Description: PR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this...
X Description: PR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this...
Opengraph URL: https://github.com/NativeScript/NativeScript/pull/11313
X: @github
Domain: Github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:18c5b832-bcba-a535-9790-d3fac7cf5f20 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DCE8:12EAEE:A4E61F:EB77D9:6A63856B |
| html-safe-nonce | b9e44c57929b4c92a67379432425cc28e5ea634b280942a72ade1c13f84e2801 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQ0U4OjEyRUFFRTpBNEU2MUY6RUI3N0Q5OjZBNjM4NTZCIiwidmlzaXRvcl9pZCI6IjE0NTg5Nzg5ODYxMTkxMDM4NTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1229422576eb6fb5e03e5499fd512071d7222cad5334ebce115147d8380f8c64 |
| hovercard-subject-tag | pull_request:4117896416 |
| 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/11313/files |
| twitter:image | https://avatars.githubusercontent.com/u/4061767?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/4061767?s=400&v=4 |
| og:image:alt | PR Checklist The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/tools/notes/CONTRIBUTING.md#commit-messages. There is an issue for the bug/feature this... |
| 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