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");
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.