You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ma...@apache.org on 2026/05/18 15:15:44 UTC

(cordova-ios) branch fix/scene-delegate-universal-links created (now db494d49)

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

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


      at db494d49 fix: forward NSUserActivity to plugins via CDVSceneDelegate

This branch includes the following new commits:

     new db494d49 fix: forward NSUserActivity to plugins via CDVSceneDelegate

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


(cordova-ios) 01/01: fix: forward NSUserActivity to plugins via CDVSceneDelegate

Posted by ma...@apache.org.
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 <ma...@outlook.de>
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: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org