Fire alert when a USB device is connected to the MAC

I am very new to developing applications for the Macintosh. I have a question, can I open the application when a user connects a USB device to a Macintosh? I'm very curious. Since I have a device, and when I connect it to the MAC system, I need to open the application installed in the application and receive data from the USB device. Is it possible?

+4
source share
1 answer

If it's just a file system mounted storage device, use the NSWorkspace NSWorkspaceDidMountNotification / NSWorkspaceWillUnmountNotification / NSWorkspaceDidUnmountNotification notification to listen to it.

If you are looking for some other type of device, you will need to dive deeper. Check out the USB device interface guide .

+2
source

All Articles