I’m using this function in my app, to handle calls from other applications:
(BOOL)application:(UIApplication *)application openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation
I need to understand how can I re-launch the app that has launched my app after I finished handling the request.
In short – I need the source app to be in foreground once I have finished handled issues in my app.
Here the flow:
- User click on some button on 3rd party’s app (it can be any app, not a specific one)
- the button uses
[[UIApplication sharedApplication] openURL:[NSURL
URLWithString:sourceApplication]]
to open my app.
- I perform some actions in my app.
- The 3rd party’s app (source app) re-opened.
Any ideas?
Thanks!
(btw – I think that Facebook API does that too, but not sure.)
Facebook does that because they know your app’s url since you have to add fb[APPID] url where [APPID] is your Facebook app ID.
There is this idea for a specification that handles what you want: http://x-callback-url.com but in order to use it, both apps would have to support it.