How to implement IOServiceMatchingCallBack in Swift

前端 未结 3 682
执念已碎
执念已碎 2021-01-15 12:08

I would like to detect a specific USB is plugged in/removed in my application. For now, I can get the deviceName with this tutorial Working With USB Device Interfaces. But,

3条回答
  •  一整个雨季
    2021-01-15 13:06

    Got this working thanks! Only problem was that I wasn't using the iterator in my callback function, so that function wasn't even getting called! Seems like strange behaviour to me, but that was my problem

提交回复
热议问题