I tried following code but it is not working
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel://%@",@"55698"]]];
Please provide help which support iOS7 SDK.
Remove // after tel: in your code
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:55698"]];
OR
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel:%@",@"55698"]]];
Above answers are fine. Still please log, you have some Blank space
(@" "
) left in front or back of the Phone number string. I was facing same problem and getting the error like this:
LaunchServices: ERROR: There is no registered handler for URL scheme (null)
Then I have added that code and Open the Prompt dialler like the Below code
NSString *strPhone=[[[dictEvent valueForKey:@"app_contact_value"] stringByReplacingOccurrencesOfString:@"+" withString:@""] stringByReplacingOccurrencesOfString:@" " withString:@""];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"telprompt://%@",strPhone]]];
and now it is Running fine.
You can also directly call with phone number like other answers:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"telprompt://%@",strPhone]]];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With