如何确定iOS设备是否连接到台式电脑(和iTunes)

发布于 2024-11-10 09:13:31 字数 53 浏览 3 评论 0原文

有没有办法确定 iOS 设备是否使用 USB 线连接到台式电脑并且在 iTunes 上列出。

Is there way to determine whether an iOS device is connected to a desktop computer using USB cable and it is listed on iTunes.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

故事和酒 2024-11-17 09:13:31

是的,您可以使用外部通知此类事件附件框架

“每当连接或断开硬件附件时,它都能够发送通知。虽然它有能力,但它不会自动执行此操作。您的应用程序必须明确请求通过调用生成通知这EAAccessoryManager 类的 registerForLocalNotifications 方法 当附件已连接、经过身份验证并准备好与您的应用程序交互时,框架会在附件断开连接时发送 EAAccessoryDidConnectNotification 通知。它会发送 EAAccessoryDidDisconnectNotification 通知,您可以使用默认的 NSNotificationCenter 注册接收这些通知,并且这两个通知都包含有关哪个配件受到影响的信息。”

Yes you can be notified of such events using The External Accessory framework.

"It is capable of sending notifications whenever a hardware accessory is connected or disconnected. Although it is capable, it does not do so automatically. Your application must specifically request that notifications be generated by calling the registerForLocalNotifications method of the EAAccessoryManager class. When an accessory is connected, authenticated, and ready to interact with your application, the framework sends an EAAccessoryDidConnectNotification notification. When an accessory is disconnected, it sends an EAAccessoryDidDisconnectNotification notification. You can register to receive these notifications using the default NSNotificationCenter, and both notifications include information about which accessory was affected."

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文