If I use UIWebView to display a phone number and set the data detector type to UIDataDetectorTypePhoneNumber, then when I click on the number its possible to make a phone call.
After the phone call has ended I am returned back to my app.
However if I attempt to programatically invoke the phone app using
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:123456789"]];
or
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://123456789"]];
Then it is not possible to return back to my app after the call has finished.
Is it possible to be able to programmatically launch the phone app and then return back to my app after the call is finished, the same as if the user clicks on a number in a UIWebView?
Unfortunately, Apple does not allow this to occur, as when you do the openURL command, it will open that application, and since you cannot access anything within that application, you will have to re-enter your application yourself. You can however save your state in
NSUserDefaults, and then have the user be able to go back to the same part of the app as when they left. Check here for help: iOS Human Interface Guidelines