iOS 5 tel link not working

僤鯓⒐⒋嵵緔 提交于 2019-12-11 04:30:19

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!