问题
I built an app that has a simple tel
link:
- (IBAction) makeCall:(id)sender
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://8005555555"]];
}
It worked fine when I was testing on iOS 4.
Just before I released it, I upgraded to iOS 5, and now I find that the tel link isn't working. Does anyone know if this might be something to do with iOS 5, or am I barking up the wrong tree?
UPDATE: This is for an app I built for the company I work for, and in order to fix it, my boss has to give me access to the code, which he's kind of dragging his feet with. I'll update as soon as I have access and can find out if the solution ott gave works.
回答1:
The correct URL should be tel:8005555555
. It could be that the //
were ignored earlier.
See also http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/PhoneLinks.html
来源:https://stackoverflow.com/questions/8233509/ios-5-tel-link-not-working