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

Paperino
  • 935
  • 7
  • 14

1 Answers1

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.

Frederik Carlier
  • 4,606
  • 1
  • 25
  • 36