Execute an application on Mac OS X when a particular type of USB device is connected?

前端 未结 5 2257
感动是毒
感动是毒 2020-12-14 03:32

I need to implement a Mac OS X application. In my application I need to do two things:

  1. Execute / Open an application when a particular type of USB device is c
5条回答
  •  执念已碎
    2020-12-14 04:08

    It really depends on what sort of application you are looking at.

    It does look like there is no way to do it in a similar fashion to udev for example.

    To controversial solutions would be:

    • Write a custom wrapper driver for your device
    • Use libusb and have a daemon to wait for certain device.

    And in fact one could write a program with libusb which will handle this sort of tasks according to a given config file, that would be also cross-platform since libusb supports quite a few platforms.

提交回复
热议问题