iosobjective-ccocoa-touchfast-app-switching

App to App Switch - Back to Launcher App


It is now a common practice to show a band at the top of the application to allow users to switch back to the application which launched the current foreground app. We can see the bar in Facebook Messenger when launched from main Facebook app, in Maps app when launched from Safari etc. (See image below: "Touch to return to Facebook")

I understand that it will be possible to show the band simply by taking the name of the application from sourceApplication

-(BOOL) application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation

and then show the band as a view at the top of the application. Handle user tap on the band (which will be a UIView) and then invoke the scheme of the launcher app which we will already know.

enter image description here

But my question is -- Is there any API available which lets you do this? This is because the just pushing the Application down may mess with the existing UI and everything.


Solution

  • It's an informal protocol involving the x-source and x-success parameters passed into the openURL of the google maps app URL scheme. It's all part of the x-callback-url protocol for exchanging data in this manner.