I am switching to map app from my app to show the location,can some one guide me how can I come back to my app.Here is the code I am using
UIApplication *app = [UIApplication sharedApplication];
[app openURL:[NSURL URLWithString:@"http://maps.google.com/maps?q=Paris"]];
You can’t! As far as I know (until iOS 5.0).
Instead you can embed the map using mapkit in your app.
So basically as of now there is now way to ask other apps (Safari, Map, mail, photos, or any other app for that mater) to hand it back to you (return the control to you).
The solution is to embed their services into your app using published API, almost all Apple apps have this, like the mail (
MFMailComposeViewControllerin<MessageUI/MessageUI.h>), or map (mapkit), or Camera API … any many popular 3rd party apps also have some way of helping you achieve this, either by providing libraries or using the Apple provided facilities.