Hello,
We are currently developing a device with a USB-C drive, and we want to connect it to iOS devices to import the stored files into our app.
I have a few questions regarding this:
MFi Certification Requirement
We believe that MFi certification is not necessary for USB-C connections. Is this understanding correct?
Implementation Method
We prefer not to use standard components like UIDocumentPickerViewController. Are there any methods to access the file system directly, or any other suitable approaches you can recommend?
If anyone has experience with this, your advice would be greatly appreciated. Thank you in advance.
We believe that MFi certification is not necessary for USB-C connections. Is this understanding correct?
Yes, that's correct. The system directly supports USB mass storage devices. The system will mount the volume and make it accessible through Files.app and APIs like UIDocumentPickerViewController.
Implementation Method We prefer not to use standard components like UIDocumentPickerViewController. Are there any methods to access the file system directly, or any other suitable approaches you can recommend?
No, not really. You can use our standard components to get access to a directory and then provide your own navigation UI, but the only mechanism that will get you that initial access in one of our controls. In addition, there is currently an issue with cross volume bookmarks (r.102995804) which prevents resolution from working across volume mounts, so you also can't (reliably) use a bookmark to preserve access like you could on the users local storage. As things now, there isn't a good way for an iOS app to preserve long term access to an external file system.
or any other suitable approaches you can recommend?
Anticipating the question, yes, it is technically possible to access a mass storage device through DriverKit. However, it would require enormous work and come with considerable downsides. In particular:
-Access to the device would be through "USBDriverKit" and a custom UserClient. That means the actual device communication would be handle through "raw" USB commands NOT through the systems SCSI implementation. You'd need to build your own SCSI AND file system implementation on "top" USBDriverKit, then handle routing data out to user space through your custom user client.
-The DEXT will prevent the mass storage layer from loading on this device, so all access will be restricted to "your" app. A USB DEXT and release it's access, so it might be possible to enable access again but the transition process would be cumbersome.
-DriverKit entitlements are tied to specific hardware, so the is only an option when the hardware involved is "yours".
Basically, it's possible in the technical sense but the work involved is so large that it's only really viable for very specific cases where the file system configuration is inherently extremely simple and the user has no reason to access the storage independently.
Similarly, I'd only even consider something like this for existing hardware with a VERY significant installed base. If you're building a new product, I think it would be FAR easier to use multiple LUNs, allowing the system to attach to the mass storage LUN and you DEXT to connect to a vendor specific LUN.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware