Github user Giorgioshooter commented on a diff in the pull request:
https://github.com/apache/cordova-ios/pull/321#discussion_r123078485
--- Diff: CordovaLib/Classes/Public/CDVPlugin.m ---
@@ -140,6 +142,36 @@ - (void)handleOpenURL:(NSNotification*)notification
}
}
+/*
+ NOTE: calls into JavaScript must not call or trigger any blocking UI,
like alerts
+ */
+- (void)handleOpenURLWithApplicationSourceAndAnnotation:
(NSNotification*)notification
+{
+
+ // override to handle urls sent to your app
+ // register your url schemes in your App-Info.plist
+
+ // The notification object is an NSDictionary which contains
+ // - url which is a type of NSURL
+ // - sourceApplication which is a type of NSString and represents the
package
+ // id of the app that calls our app
+ // - annotation which a type of Property list which can be several
different types
+ // please see
https://developer.apple.com/library/content/documentation/General/Conceptual/DevPedia-CocoaCore/PropertyList.html
+
+ NSDictionary* notificationData = [notification object];
+
+ if ([notificationData isKindOfClass: NSDictionary.class]){
+
+ NSURL* url = notificationData[@"url"];
+ NSString* sourceApplication =
notificationData[@"sourceApplication"];
--- End diff --
No problem at all.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]