Define the target info.plist application as follows.
<key>LSApplicationQueriesSchemes</key> <array> <string>Myapp</string> </array> <key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleURLName</key> <string>com.Myapp.demo</string> <key>CFBundleURLSchemes</key> <array> <string>Myapp</string> </array> </dict> </array>
Put this method in the target application AppDelegate.m
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { return YES; }
Now you can use the app-app for an open app using this.
NSString *customURLString = [NSString stringWithFormat: @"Myapp://"]; NSURL *customURL = [NSURL URLWithString: customURLString]; [[UIApplication sharedApplication] openURL: customURL];
The status bar will display Back To App .
You can also check by typing Myapp: // from Safari . it will open your application with Back To Safari .
source share