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:
- [email protected]
- [email protected] (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:
- [email protected]
- [email protected]
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]