I need to return to my app after making a call from my app, so I use this code:
NSURL *url = [NSURL URLWithString:@"telprompt://123-4567-890"];
[[UIApplication sharedApplication] openURL:url];
When the user presses a button to execute this code, an alert is shown with 2 buttons, "Call" and "Cancel".
How can I find out if the user pressed the "Call" button?
This isn't perfect, but you could identify that "call" was pressed instead of "cancel" by listening for the UIApplicationSuspendedNotification (you'd have to add some logic to ignore this event when someone pushed the 'home' key, or was accepting an incoming call... maybe by adding/removing the observer around the logic where the phone number is being presented):
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(suspended:) name:@"UIApplicationSuspendedNotification" object:nil];
-(void)suspended:(NSNotification *) notification
{
NSLog(@"Suspended");
}