Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call back url for iOS app?

I am working on a project where I share video on Vimeo. In this My app open a video where user needs to press authorize button to authorize the app at Vimeo and to get access tokens. So, for this, my app opens safari and open Vimeo's site there. The user needs to press allow button then it has to come back again to the app. But I am not able to know what should be the call back url to make the Safari/Vimeo to come back to my app.

Please suggest your views regarding this.

like image 617
Sanchit Paurush Avatar asked Jul 09 '13 05:07

Sanchit Paurush


1 Answers

You need to set a custom URL scheme for your app by editing your app's Info.plist. There's plenty of documentation about this on Apple's developer website. Here's an article that goes into detail: http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html

Then your website just needs to open a url that uses your app's url scheme (eg: myappscheme://do/something/cool?foo=bar). If your app cares about any data passed in to it via your website then implement the "application:openURL:sourceApplication:annotation:" method and inspect the NSURL passed in. You can read more about this in Apple's documentation: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIApplicationDelegate_Protocol/Reference/Reference.html

like image 93
Nicholas Hart Avatar answered Sep 21 '22 07:09

Nicholas Hart