which compiles, but I never get a notification of arrival or depature of a device.
The one thing I can’t do is call CFRunLoopRun() at the end. I assume that at some low level the JUCE application classes are calling something that starts the RunLoop. Does it suffice to CFRunLoopAddSource() with the new events to listen for without calling CFRunLoopRun()?
I think that you just need to add it to the current run loop. I was adding a Mac menu to a little JUCE test app and I didn’t need to make my own run loop to service the menu events - the event dispatcher just did the right thing.
I haven’t tried it myself for this case, but I suspect it works the same.