Github user shazron commented on a diff in the pull request:

    https://github.com/apache/cordova-ios/pull/321#discussion_r123074527
  
    --- 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 --
    
    I know it's trivial, but I would add the line where you extract the 
annotation here as well, to be complete, for users that rely on looking at 
source code on how to get at the data (who usually are not proficient at Obj-C)


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org
For additional commands, e-mail: dev-h...@cordova.apache.org

Reply via email to