简体   繁体   中英

iOS 5 tel link not working

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM