libimobiledevice - Is it possible to listen to device connections via libimobiledevice?
问题描述
I am trying to do something every time my iPhone is connected (via USB or wifi). Current alternative is polling list_devices and wait to see my device listed. Is there something better or polling is the only option? This is platform independent, but I am testing on Windows
解决方案
You can subscribe for notifications which are sent by iTunes/usbmuxd whenever a new device is connected. If you're using libimobiledevice, you can use idevice_event_subscribe
to register a callback which is invoked whenever a device is added or removed.
推荐阅读
- python - Python 将 JSON 标准化为 DataFrame
- javascript - 这个关键字问题?
- kubernetes - k8s升级集群时的pod状态
- c# - Blazor WASM Button Onclick 每次都不会触发
- r - If else条件替换R中的列值
- linux - 如何在 iov_iter 结构中打印数据
- python - 为什么我的 Jupyter 实验室不会读取我的 cartopy 包
- java - 广告投放有限,仍然无法与真人交流?
- node.js - 为什么 node js 的某些模块在 Visual Studio Code 中不显示变量建议?
- swift - 如何在swift5中获取引用类型内存地址和值类型内存地址?