开发者

Fire notifications once USB device is connected to MAC

开发者 https://www.devze.com 2023-03-20 03:06 出处:网络
I am very new to Macintosh Application Development. I have a question that, is it possible to open my application whenuser connects a USB device to the Macintosh? I am very curious on this. Beca开发者

I am very new to Macintosh Application Development. I have a question that, is it possible to open my application when user connects a USB device to the Macintosh? I am very curious on this. Beca开发者_C百科use I have a device and when I connect it to MAC system I need to open my application installed in the app and get the data from the USB device. Is this possible?


If it's just a storage device with a mountable file system, use NSWorkspace's NSWorkspaceDidMountNotification/NSWorkspaceWillUnmountNotification/NSWorkspaceDidUnmountNotification notifications to listen for it.

If you're looking for any other type of device, you'll have to dive a lot deeper. Check out the USB Device Interface Guide.

0

精彩评论

暂无评论...
验证码 换一张
取 消