Skip to content

fix(ios): skip subframe intercepts, improve auth popup support - #31

Merged
farfromrefug merged 1 commit into
nativescript-community:masterfrom
modos189:fix/ios-popup-auth
Sep 11, 2026
Merged

farfromrefug merged 1 commit into
nativescript-community:masterfrom
modos189:fix/ios-popup-auth

Conversation

@modos189

@modos189 modos189 commented May 28, 2026

Copy link
Copy Markdown
Contributor

Rebased on top of #33 - the decisionHandler(Cancel) fix that was part of this PR landed there, so two changes remain.

Subframe navigations

decidePolicyForNavigationAction fires for every frame, so an iframe navigating to another origin was passed to shouldOverrideUrlLoading. Apps that return true for external urls cancelled that navigation, breaking cross-origin auth flows (OAuth, gapi) that load their endpoints in a hidden frame. Only main-frame navigations are reported now.

Side effect: loadStarted is no longer emitted for subframes. That matches Android, where onPageStarted fires for the main frame only.

Popup presentation

UIApplication.sharedApplication.keyWindow is deprecated since iOS 13 and returns nil in multi-scene apps, so the walk down presentedViewController started from the wrong root - or from nothing at all. Start it from the webview's own window instead.

@farfromrefug
farfromrefug merged commit d466a58 into nativescript-community:master Sep 11, 2026
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.

2 participants