You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "hitomi0109 (via GitHub)" <gi...@apache.org> on 2026/05/18 14:50:39 UTC
[I] Regression: Universal Links from SFSafariViewController do not return to app on cordova-ios 8 due to SceneDelegate handling [cordova-ios]
hitomi0109 opened a new issue, #1654:
URL: https://github.com/apache/cordova-ios/issues/1654
### Issue Summary
Universal Links do not return to the Cordova app when tapped inside SFSafariViewController on `cordova-ios@8`.
### Environment
- Cordova CLI: 13
- cordova-ios: 8.x (using latest Git source due to blank screen / about:blank issue)
- Ionic CLI: 6.20.9
- Ionic Framework: v1 (AngularJS)
- Plugins:
- cordova-plugin-safariviewcontroller@2.0.0
- cordova-plugin-universallinks-fix@2.0.2 (based on CrowdhubApps implementation)
- iOS: 16.4.1
- Xcode: 26.5
- Xcode build: 17F42
- Device: real device
### Steps to Reproduce
1. Create a Cordova iOS project with `cordova-ios@8`
2. Install:
- cordova-plugin-universallinks-fix@2.0.2
- cordova-plugin-safariviewcontroller@2.0.0
3. Configure Universal Links (Associated Domains / AASA)
4. Open a page using SFSafariViewController
5. Tap a Universal Link pointing back to the same app
### Expected Behavior
The Universal Link should return to the app and be handled correctly.
### Actual Behavior
The Universal Link does not return to the app when tapped inside SFSafariViewController.
### Regression / Comparison
- On `cordova-ios@7`, Universal Links worked correctly (using a different plugin implementation)
- On `cordova-ios@8`, Universal Links are not delivered to the app in this scenario
### Notes
- The same Universal Link works correctly when opened from Safari or other external apps
- The issue occurs only when the link is tapped inside SFSafariViewController
- This report is separate from the known `about:blank` / blank screen issue in cordova-ios@8
### Cause
The issue appears to be related to SceneDelegate handling in `cordova-ios@8`.
`NSUserActivity` (Universal Link) events received in SceneDelegate are not propagated to the Cordova AppDelegate layer, so plugins cannot receive them.
### Workaround / Fix
Forward `NSUserActivity` from SceneDelegate to AppDelegate:
```swift
import Cordova
import UIKit
class SceneDelegate: CDVDelegate {
override func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
if let appDelegate = UIApplication.shared.delegate as? AppDelegate {
_ = appDelegate.application(
UIApplication.shared,
continue: userActivity,
restorationHandler: { _ in }
)
}
}
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] Regression: Universal Links from SFSafariViewController do not return to app on cordova-ios 8 due to SceneDelegate handling [cordova-ios]
Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on issue #1654:
URL: https://github.com/apache/cordova-ios/issues/1654#issuecomment-4479266569
Hi @hitomi0109,
I was a little bit fast with my PR and that you can test it. PR #1655 is a step in the right direction, but it won't fully fix your problem on its own — let me explain the current state.
What PR #1655 does
Before this fix, `CDVSceneDelegate` had no implementation of `scene:continueUserActivity:`, so any `NSUserActivity` delivered by iOS (i.e. Universal Links) was silently dropped and no plugin ever received it. The PR adds that handler and broadcasts the activity as a new `CDVPluginContinueUserActivityNotification` via `NSNotificationCenter`, consistent with how URL-scheme opens are handled.
Why your plugin still won't work after the PR
`cordova-plugin-universallinks-fix` was written for cordova-ios 7, where Universal Links were delivered to `AppDelegate.application(_:continue:restorationHandler:)`. On cordova-ios 8, iOS routes them to the `SceneDelegate` instead, so the plugin's existing `AppDelegate` hooks never fire regardless of this PR.
For the plugin to work on cordova-ios 8, it needs to be updated to observe the new `CDVPluginContinueUserActivityNotification` notification.
What you can do in the meantime
The workaround from your issue report is still valid — override `scene(_:continue:)` in your app's `SceneDelegate.swift` and forward to `AppDelegate` manually. Just note that `CDVDelegate` in your snippet should be `CDVSceneDelegate`:
I'd recommend opening an issue or PR against `cordova-plugin-universallinks-fix` pointing to #1655 and the new notification name, so the plugin can be updated to support cordova-ios 8 properly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] Regression: Universal Links from SFSafariViewController do not return to app on cordova-ios 8 due to SceneDelegate handling [cordova-ios]
Posted by "hitomi0109 (via GitHub)" <gi...@apache.org>.
hitomi0109 commented on issue #1654:
URL: https://github.com/apache/cordova-ios/issues/1654#issuecomment-4479524776
Hi GitToTheHub,
Thank you for the detailed explanation and for the PR.
I tested the changes by updating to the PR version of cordova-ios, but the issue was not fully resolved in my environment with the current `cordova-plugin-universallinks-fix`.
My local workaround (forwarding `scene(_:continue:)` to AppDelegate) still works.
Also, thank you for pointing out that `CDVSceneDelegate` should be used instead of `CDVDelegate`.
I understand that the plugin needs to be updated to listen to `CDVPluginContinueUserActivityNotification`. I will look into the plugin side and consider opening an issue or PR there.
Thanks again for your help.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] Regression: Universal Links from SFSafariViewController do not return to app on cordova-ios 8 due to SceneDelegate handling [cordova-ios]
Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on issue #1654:
URL: https://github.com/apache/cordova-ios/issues/1654#issuecomment-4480227917
Hi @hitomi0109,
good to hear. I will merge the PR and the plugin maintainer could make an update.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] Regression: Universal Links from SFSafariViewController do not return to app on cordova-ios 8 due to SceneDelegate handling [cordova-ios]
Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub commented on issue #1654:
URL: https://github.com/apache/cordova-ios/issues/1654#issuecomment-4479079571
Hi, can you test #1655 if this fixes this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] Regression: Universal Links from SFSafariViewController do not return to app on cordova-ios 8 due to SceneDelegate handling [cordova-ios]
Posted by "hitomi0109 (via GitHub)" <gi...@apache.org>.
hitomi0109 commented on issue #1654:
URL: https://github.com/apache/cordova-ios/issues/1654#issuecomment-4480031712
Hi [GitToTheHub](https://github.com/GitToTheHub),
I tested the plugin-side change in my fork:
https://github.com/hitomi0109/cordova-universal-links-plugin
After adding support for `CDVPluginContinueUserActivityNotification` in `CULPlugin.m`, Universal Links now work correctly in my environment with cordova-ios 8.
So PR #1655 on cordova-ios provides the necessary notification, and the plugin also needs to listen to that notification.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] Regression: Universal Links from SFSafariViewController do not return to app on cordova-ios 8 due to SceneDelegate handling [cordova-ios]
Posted by "GitToTheHub (via GitHub)" <gi...@apache.org>.
GitToTheHub closed issue #1654: Regression: Universal Links from SFSafariViewController do not return to app on cordova-ios 8 due to SceneDelegate handling
URL: https://github.com/apache/cordova-ios/issues/1654
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org