0

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

4

1 回答 1

2

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.

于 2019-10-22T09:21:39.987 回答