How to redirect an application back to a URL scheme using Xcode 6.0.1

I am working on an application that has a registration field. When registration is successful, I receive a confirmation email. When I confirm the link, I want to go to my application using URL schemes. How can i achieve this.

Thank.

+4
source share
2 answers
  • Go to the app.plst file of the application.
  • Add a line to it and name it "URL Types".
  • Expand the first element in the "URL types" and add the line "URL ID", the value of this line should be the reverse domain for your application, for example. "Com.yourcompany.myapp".
  • " URL" " URL".
  • "URL-" URL-, , , "myapp://", "myapp".

URL, URL- . , URL- .

UIApplicationDelegate, . , , .

:

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
  if (!url) { 
    return NO; 
  } 
  // Do something with the url here 
}

this.

+6

"" URL types " URL" - , "myApp". : myApp://something, . , "-" "".

+2

All Articles