问题描述
我们正在构建的应用程序具有一个简单的按钮,可以启动具有特定编号的Facetime会话.这里没有大忌.
The app we're building has a simple button that starts a facetime session with a specific number. No biggee here.
我用
[[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString: @"facetime://5555555555"]];
检查设备是否可以进行面对面呼叫.再次,这很好.
to check if the device is capable of facetime calls. Again, this works fine.
但是,用户可以通过其设备的设置屏幕来打开/关闭Facetime.关闭facetime时,即使禁用facetime,上述canOpenURL
方法仍会返回YES
.当我通过openURL
方法开始新的会话时,屏幕仅转到我的联系人列表,而没有启动面对面会话.
But a user can turn facetime on/off through the settings screen of his device.When facetime is turned off the above canOpenURL
method still returns YES
even though facetime is disabled. And when I start a new session through the openURL
method the screen simply goes to my contactlist without starting a facetime session.
任何人都知道是否有可能确定设备上是否启用了Facetime.
Anyone know if it's possible to determine if facetime is enabled on the device.
推荐答案
不幸的是,无法检测到FaceTime是否已启用(从iOS 5.1开始).抱歉.
Unfortunately, there is no way that you can detect if FaceTime has been enabled or disabled (as of iOS 5.1). Sorry.
至于...
facetime://5555555555
...根据此Apple开发者论坛帖子,Apple拒绝使用未记录API的应用,而FaceTime就是其中之一.看第四篇.
...according to this Apple Developer forum post, Apple rejects apps that uses undocumented APIs, and FaceTime is one of them. Look at the fourth post.
这是该人的链接在谈论.
This is the link that the person was talking about.
可能还有另一种解决方法,但我现在想不出任何办法.希望这有助于回答您的问题.
There is probably another way around it, but I can't think of anything right now. Hopes this helps answer your question.
这篇关于检查设备上是否启用了面对面时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!