开发者

Fire notifications once USB device is connected to MAC

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜