Hi, I am trying to develop MacOS application which will be connecting to USB devices and should be available in AppStore. So it must be Sandbox and probably I've to use permission com.apple.security.device.usb.
I think this is a case where I need a much better understanding of what you're actually trying to do and why.
The problem with what you're asking here:
I've following requirements:
I need to detect USB devices with file system
I need to have ability to upload & download files from this device
I need to read device serial number
...is that it sounds like what you'd like to do is attach a USB device to your mac and transfer (up or down) a file(s) to it without directly over USB, without using any "higher level" API.
If that's the case then:
-
In theory, it's entirely possible. Strictly speaking, the IOUSBHost framework will allow you to exchange USB traffic with device. Exchanging USB traffic is all any USB device does so, sure, it's possible.
-
In practice, it's somewhere between "an enormous pain" and "wildly impractical", depending on exactly how narrow what you're trying to do is and what code you already have. I'm happy to outline what's required, but it's directly equivalent to creating an entire mass storage stack from "scratch".
I wonder if I can use IOKit for this and it will be compliant with AppStore rules or not?
Again, this really depends on what you're actually trying to do. I can think of many approaches that would be App Store compatible. However, the problem wouldn't be getting them on the store, it would be getting them to work at all.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware