简体   繁体   English

如何在Windows Forms应用程序中检测连接到USB的移动设备(Iphone)?

[英]How to detect mobile device(Iphone) connected to USB in windows forms application?

I am developing a windows forms application which should communicate with Mobile devices(First with iOS devices, later with Android). 我正在开发Windows窗体应用程序,该应用程序应与移动设备通信(首先与iOS设备通信,然后与Android设备通信)。 Communication can only be through Usb port. 只能通过USB端口进行通信。 Which is the best way to detect if the mobile device is connected, and if it is possible to connect windows application with only a specific mobile application. 这是检测移动设备是否已连接以及是否有可能仅将Windows应用程序与特定移动应用程序连接的最佳方法。 I hope someone can help me! 我希望有一个人可以帮助我!

Thank you 谢谢

I know this post is a bit old, but I recently wrote a blog post explaining how I was able to achieve this 我知道这篇文章有些陈旧,但是我最近写了一篇博客文章,解释了我如何实现这一目标

http://thecodewash.blogspot.com/2017/05/communicating-with-your-ios-app-over.html http://thecodewash.blogspot.com/2017/05/communicating-with-your-ios-app-over.html

To answer your question (so this answer isn't just a link), yes it definitely is possible to achieve this utilizing the USB Multiplexing Daemon (usbmuxd) program that is usually installed as part of iTunes. 要回答您的问题(因此,这个答案不只是一个链接),是的,肯定可以使用通常作为iTunes一部分安装的USB Multiplexing Daemon(usbmuxd)程序来实现。 This program can create a socket connection to your iOS device through the USB cable, and allow you to communicate via that socket connection like you would any other socket. 该程序可以通过USB电缆建立与iOS设备的套接字连接,并允许您像其他任何套接字一样通过该套接字连接进行通信。 The link goes into much more detail. 该链接会详细介绍。

Hope this helps anyone else looking for answers regarding this. 希望这可以帮助其他人寻找与此相关的答案。

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

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