iOS和Mac、windows通过数据线通信 | 您所在的位置:网站首页 › itunes怎么连接iDevlce › iOS和Mac、windows通过数据线通信 |
通过搜索和查询,可以看到iOS的USB底层为usbmuxd,本质为从本地启用一个socket,监听socket的连接。把usb的数据转换到socket。具体的原理可以搜索一下或查看官方文档。 iOS和Mac之间通过USB数据线传递数据,这样的demo在GitHub上有一个非常好的例子,peertalk:https://github.com/rsms/peertalk 这个demo可以很好的让iOS和Mac之间通信,通过在这个的基础上,可以很好的进行改造。 Windows的可以利用libimobiledevice,实现类似peertalk的协议,然后就可以和iOS通信了。当然也可以进行自定义通信协议。 libimobiledevice API: https://www.libimobiledevice.org/docs/html/files.html 具体的使用的时候可以进行深入研究一下。 windows参考代码 window端:https://github.com/Polyfun/libimobiledevice-windows iPhone端:https://github.com/rsms/peertalk 参考链接: 1、https://www.jianshu.com/p/087fd3ccdd9f 2、https://www.jianshu.com/p/eba133891ec6
|
CopyRight 2018-2019 实验室设备网 版权所有 |