incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CB-851) guide for using url schemes in ios
Date Fri, 01 Jun 2012 22:46:22 GMT

    [ https://issues.apache.org/jira/browse/CB-851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287614#comment-13287614
] 

Shazron Abdullah edited comment on CB-851 at 6/1/12 10:45 PM:
--------------------------------------------------------------

The url scheme passed to the app is a form of inter-process communication, kinda like how
we do gap:// urls, but this is up to the app developer on how they marshal/unmarshal the url
into something they can use.

Right now in iOS, it is a bit confusing - there are two ways that the URL is handled and passed
off to the UIWebView.

 1. On *first* app startup, the URL sent is passed off to the UIWebView by setting a global
variable - *window.invokeString*. The URL is passed off untouched (see: https://github.com/apache/incubator-cordova-ios/blob/master/Cordova-based%20Application/Classes/AppDelegate.m#L67)

 2. On *all* launches, the handleOpenURL function is called, and this in turn calls the global
JavaScript function in the UIWebView *window.handleOpenURL()* and this is passed the URL,
untouched (see: https://github.com/apache/incubator-cordova-ios/blob/master/Cordova-based%20Application/Classes/AppDelegate.m#L126)

Apple Doc reference: http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AdvancedAppTricks/AdvancedAppTricks.html#//apple_ref/doc/uid/TP40007072-CH7-SW21



                
      was (Author: shazron):
    The url scheme passed to the app is a form of inter-process communication, kinda like
how we do gap:// urls, but this is up to the app developer on how they marshal/unmarshal the
url into something they can use.

Right now in iOS, it is a bit confusing - there are two ways that the URL is handled and passed
off to the UIWebView.

 1. On *first* app startup, the URL sent is passed off to the UIWebView by setting a global
variable - *window.invokeString*. The URL is passed off untouched (see: https://github.com/apache/incubator-cordova-ios/blob/master/Cordova-based%20Application/Classes/AppDelegate.m#L67)

 2. On *subsequent* launches, i.e. resume from background (multi-tasking), the handleOpenURL
function is called instead, and this in turn calls the global JavaScript function in the UIWebView
*window.handleOpenURL()* and this is passed the URL, untouched (see: https://github.com/apache/incubator-cordova-ios/blob/master/Cordova-based%20Application/Classes/AppDelegate.m#L126)

Apple Doc reference: http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/AdvancedAppTricks/AdvancedAppTricks.html#//apple_ref/doc/uid/TP40007072-CH7-SW21



                  
> guide for using url schemes in ios
> ----------------------------------
>
>                 Key: CB-851
>                 URL: https://issues.apache.org/jira/browse/CB-851
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Docs, iOS
>            Reporter: Brian LeRoux
>            Assignee: Shazron Abdullah
>            Priority: Trivial
>             Fix For: 1.8.0
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message