I have a small program to find out the Vendor ID and Product ID of all the USB CDC devices connected to Mac. The program uses the IOServiceNameMatching and IOServiceGetMatchingServices to get the matching dictionary and service iterator respectively as shown in the code snippet below:
matchingDictionary = IOServiceNameMatching("AppleUSBCDC");
IOServiceGetMatchingServices(kIOMasterPortDefault, matchingDictionary, &serviceIterator);
I then iterate through serviceIterator to enumerate and extract the IDs of all the connected USB CDC devices. This used to perfectly work fine until OSX 10.10 but the IOServiceGetMatchingServices is returning empty iterator in OSX 10.11. Why is it returning empty iterator only on OSX 10.11 even though the USB CDC devices are connected? Is there an alternate way to get the device list in OSX 10.11?