This project shows how to use the IOKit notification mechanism to register to be notified when devices come and go. It uses the Cypress/Anchor EZ-USB chip. (Look at the following example for another way to get notified when a device is unplugged).