简体   繁体   English

iOS 5电话链接不起作用

[英]iOS 5 tel link not working

I built an app that has a simple tel link: 我构建了一个具有简单tel链接的应用程序:

- (IBAction) makeCall:(id)sender
{
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://8005555555"]];
}

It worked fine when I was testing on iOS 4. 当我在iOS 4上进行测试时,效果很好。

Just before I released it, I upgraded to iOS 5, and now I find that the tel link isn't working. 在发布之前,我已升级到iOS 5,现在我发现tel链接不起作用。 Does anyone know if this might be something to do with iOS 5, or am I barking up the wrong tree? 有人知道这可能与iOS 5有关吗,还是我叫错了树?

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. 只要有访问权限,我就会立即进行更新,并找出ott解决方案是否可行。

The correct URL should be tel:8005555555 . 正确的URL应该是tel:8005555555 It could be that the // were ignored earlier. //可能早些时候已被忽略。

See also http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/PhoneLinks.html 另请参见http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/PhoneLinks.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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