This is an automated email from the ASF dual-hosted git repository.

GitToTheHub pushed a commit to branch fix/scene-delegate-universal-links
in repository https://gitbox.apache.org/repos/asf/cordova-ios.git

commit db494d49948ff2f0e414d5aef66cafecbd372c63
Author: Manuel Beck <[email protected]>
AuthorDate: Mon May 18 17:15:28 2026 +0200

    fix: forward NSUserActivity to plugins via CDVSceneDelegate
    
    Add scene:continueUserActivity: to CDVSceneDelegate so that
    NSUserActivity events (Universal Links, Handoff) received by the
    active UIWindowSceneDelegate are forwarded to Cordova plugins via
    CDVPluginContinueUserActivityNotification.
    
    Previously, CDVSceneDelegate only handled URL-scheme opens
    (scene:openURLContexts:). When a Universal Link was tapped inside
    SFSafariViewController, iOS delivered an NSUserActivity to the scene
    delegate, which was silently dropped because no handler existed.
    Plugins such as cordova-plugin-universallinks therefore never received
    the event on cordova-ios 8.x, even though they worked on cordova-ios 7
    (where the activity was delivered to AppDelegate directly).
    
    Fixes apache/cordova-ios#1654
---
 CordovaLib/Classes/Public/CDVPlugin.m               | 1 +
 CordovaLib/Classes/Public/CDVSceneDelegate.m        | 5 +++++
 CordovaLib/include/Cordova/CDVPluginNotifications.h | 1 +
 3 files changed, 7 insertions(+)

diff --git a/CordovaLib/Classes/Public/CDVPlugin.m 
b/CordovaLib/Classes/Public/CDVPlugin.m
index ea099393..2ee30640 100644
--- a/CordovaLib/Classes/Public/CDVPlugin.m
+++ b/CordovaLib/Classes/Public/CDVPlugin.m
@@ -44,6 +44,7 @@
 
 const NSNotificationName CDVPageDidLoadNotification = 
@"CDVPageDidLoadNotification";
 const NSNotificationName CDVPluginHandleOpenURLNotification = 
@"CDVPluginHandleOpenURLNotification";
+const NSNotificationName CDVPluginContinueUserActivityNotification = 
@"CDVPluginContinueUserActivityNotification";
 const NSNotificationName 
CDVPluginHandleOpenURLWithAppSourceAndAnnotationNotification = 
@"CDVPluginHandleOpenURLWithAppSourceAndAnnotationNotification";
 const NSNotificationName CDVPluginResetNotification = 
@"CDVPluginResetNotification";
 const NSNotificationName CDVViewWillAppearNotification = 
@"CDVViewWillAppearNotification";
diff --git a/CordovaLib/Classes/Public/CDVSceneDelegate.m 
b/CordovaLib/Classes/Public/CDVSceneDelegate.m
index 09db4636..da3944bb 100644
--- a/CordovaLib/Classes/Public/CDVSceneDelegate.m
+++ b/CordovaLib/Classes/Public/CDVSceneDelegate.m
@@ -47,4 +47,9 @@
     }
 }
 
+- (void)scene:(UIScene *)scene continueUserActivity:(NSUserActivity 
*)userActivity
+{
+    [[NSNotificationCenter defaultCenter] 
postNotificationName:CDVPluginContinueUserActivityNotification 
object:userActivity];
+}
+
 @end
diff --git a/CordovaLib/include/Cordova/CDVPluginNotifications.h 
b/CordovaLib/include/Cordova/CDVPluginNotifications.h
index 36245d7d..3eaa7a2b 100644
--- a/CordovaLib/include/Cordova/CDVPluginNotifications.h
+++ b/CordovaLib/include/Cordova/CDVPluginNotifications.h
@@ -22,6 +22,7 @@
 
 extern const NSNotificationName CDVPageDidLoadNotification;
 extern const NSNotificationName CDVPluginHandleOpenURLNotification;
+extern const NSNotificationName CDVPluginContinueUserActivityNotification;
 extern const NSNotificationName CDVPluginResetNotification;
 extern const NSNotificationName CDVViewWillAppearNotification;
 extern const NSNotificationName CDVViewDidAppearNotification;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to