Check if facetime is enabled on the device

烂漫一生 提交于 2019-12-23 09:58:47

问题


The app we're building has a simple button that starts a facetime session with a specific number. No biggee here.

I use

[[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString: @"facetime://5555555555"]];

to check if the device is capable of facetime calls. Again, this works fine.

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.

Anyone know if it's possible to determine if facetime is enabled on the device.


回答1:


Unfortunately, there is no way that you can detect if FaceTime has been enabled or disabled (as of iOS 5.1). Sorry.

As for...

facetime://5555555555

...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.



来源:https://stackoverflow.com/questions/9888946/check-if-facetime-is-enabled-on-the-device

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