用于检查iPhone与USB连接的应用程序 [英] An application to check iPhone connection with USB
问题描述
我想知道iPhone是否以编程方式连接到USB。
I want to know if an iPhone is connected to USB programmatically.
到目前为止,通过谷歌搜索我找到了 http://developer.apple.com/programs/mfi/ 。
So far by googling i found http://developer.apple.com/programs/mfi/.
我真的真的吗需要这个api才能知道iPhone是否连接到USB设备?
Do I really need this api to find out whether an iPhone is connected to USB device?
我只想制作一个iPhone应用程序,在控制台打印出iPhone是否与USB连接或者没有。
I just want to make an iPhone app that prints out in console whether the iPhone is connected with USB or not.
非常感谢。
推荐答案
你或许能够使用此问题的解决方案。
解决方案检测如果设备的电池当前正在充电,如果连接到USB,很可能除非它是第三方配件,在这种情况下,我认为有不同的SDK。
The solution detects if the device's battery is currently being charged which, if connected to USB, most likely will be unless it is a 3rd party accessory in which case there's a different SDK for those I believe.
在任何情况下,如果解决方案没有帮助,它可能会指向正确的方向。
In any case, if the solution isn't helpful it might point you in the right direction.
更新:
多做了一些挖掘和看来这可能无法实现除了前面提到的电池充电解决方案。
UPDATE: Did some more digging and it appears that this may not be possible other than the battery charging solution mentioned previously.
所以回答你的问题我真的需要这个api来确定iPhone是否连接到USB设备?:
So to answer your question "Do I really need this api to find out whether an iPhone is connected to USB device?":
是的,就是这样。
这篇关于用于检查iPhone与USB连接的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!