Seems like this should be simple enough but for whatever reason I am unable to get the phone feature to prompt when my UIButton is pressed.
-(IBAction)viewMapButton:(id) sender
{
NSString *phoneNumber = [[NSString alloc] initWithString:@"tel:1234567890"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneNumber]];
NSLog(@"Call");
}
My NSLog is successfully called. I am running this just on the iOS simulator; is that causing it not to prompt to place the call?
Thanks!
Flea
The iOS simulator doesn’t have a phone (just like the iPod Touch), so nothing will happen when you call the
telURL scheme.