Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Launching my app with a Custom URL Scheme and process the resulting URL from within a native module, is it possible?

$
0
0

Hello, i'm programming a native module for iOS to integrate an oauth2 native SDK(i.e., FB, TW or G+), i've made almost everything but at least a problem is left. After the authorization phase the browser returns to the app passing to it the result of the authentication, well, i need to catch that result from within the module and pass it to a native function. In a native app i can add the following code inside the application delegate class:

- (BOOL)application: (UIApplication *)application
            openURL: (NSURL *)url
  sourceApplication: (NSString *)sourceApplication
         annotation: (id)annotation {
// call the G+ sdk to handle the URL
}
In Titanium i can use Ti.App.getArguments()(although no sourceApplication is passed and this could be a problem), but what can i do to achieve this internally to a native iOS module? Perhaps registering a listener or something else? Is there a way to capture those arguments(url and sourceApplication)? Any help is really appreciated!

Thanx in advance for the answer!

-Giuseppe


Viewing all articles
Browse latest Browse all 8068


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>