Thursday, 22 November 2012

Launch iOS Application From Safari Using CustomURLScheme

If you want to take user back from Safari to your iOS Application, you can achieve it using custom url scheme.
Follow the steps:

1. Open -info.plist file and add


2. Above code will register a custom url for your application.
3. You can also pass parameters (query string) to it:
4. When this url is called from Safari iPhone SDK sends message to UIApplicationDelegate

- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
 // You are back to your application.
 NSLog(@"Yeah!!! We are back to Application from Safari");
 return YES;

5. Above method in UIApplicationDelegate will be called and we are navigated to our Native iOS app from Safari.

This same technique is used by Facebook iOS sdk.
Special thanks to :

First download source code from here: Download

After downloading run application and hit 'Open Safari' button it will take you to safari and will show you this page, now on this page hit below link 'Open Application from SAFARI' you are navigated back to application.

Open Application from SAFARI


  1. thanks you very much! Excellent blog!

  2. Hello
    Thanks for sharing great web blog . . . .
    If any Facebook and Iphone user wants to custom apps .
    they can check our link . . .
    we are expert to making custom apps thanks for read my comment.

    Custom Facebook and IPhone Apps