Both Photos and Lightroom are able to detect when a card reader has been plugged into an iPhone or iPad and a card exists with the correct DCIM format (from a digital camera).
I have been unable to find the API that allows an application to do this (except using the standard file import function and making the user navigate to the card).
ChatGPT tells me that Photos and Lightroom use a private API that is not made available to normal developers.
Does anyone know if this is true - or if not then how to detect that a card is present using Swift?
I have been unable to find the API that allows an application to do this (except using the standard file import function and making the user navigate to the card).
Have you tried using the ImageCapture framework?
ChatGPT tells me that Photos and Lightroom use a private API that is not made available to normal developers.
God bless ChatGPT...
I was curious enough that I decided it to poke at this myself. The summary is that:
-
It's sure it's private.
-
If you ask if it's REALLY sure, then yes, it's REALLY sure it's private API on iOS.
-
If you ask it if it's REALLY, REALLY sure and to please provide sources for that information...
...it confesses that ImageCaptureCore is public API and has been since iOS 13.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware