Technical discussion of iOS/iPadOS USB connectivity
Apple has built limitations into the capability of applications that read image card and/or digital cameras via the USB port.
Hardware Limitations
Section titled “Hardware Limitations”The first - and most problematic - is a hardware limitation. There is just a single USB port.
Backing up image files from one USB attached device (a camera or an SD card) to another USB device (such as an SSD) requires either the use of a hub or that the image files are cached locally.
Hubs reduce portability especially high performance hubs which require some sort of power supply.
Small non-powered adapters or hubs tend to be slow.
The other alternative is that image files are cached i.e. the camera or SD card is attached to the iPhone/iPad, the image files are copied to local storage and then the media device is swapped for a backup SSD.
This technique can be relatively high performance especially with fast image cards and a recent iPad Pro with a USB 4 port.
The downsides are that the devices have to be swapped half way thrugh the process and the iPhone/iPad must have sufficient storage capacity to store the files.
PhotoImport supports both techniques.
If both an image card and SSD are detected then image files can be copied directly from card to SSD without the need to import and store the files locally.
On the other hand PhotoImport has the capability of semi-automating the process of caching image files from camera or card locally and then backing up those files to an SSD.
Security Limitations
Section titled “Security Limitations”Apple has built severe limitations into the file handling capability of iOS and iPadOS.
User applications cannot access a file or directory unless an Apple built function has been used to grant that access.
There is a limited exception where the files are stored on media devices stored in an industry standard format (such as image cards written by digital cameras).
Using this technique is much slower and more cumbersome than just reading the filesystem on an attached device.
Image Card Identification
Section titled “Image Card Identification”When attaching an imagecard or SSD to an iPad or iPhone the volume serial number is used to identify the device.
When the volume serial number exists it is used to construct the volume mount point.
PhotoImport uses this mount point to “register” cards and SSDs, going through the granting of security access once and then creating a bookmark which allows future access.
When the external device is formatted using a modern file system (such as exFAT or APFS) a fixed volume serial number is always written to the card.
The serial number is set when the card is formatted. A new card will have the serial number changed when it is formatted in the camera or a computer.
Many digital cameras (such as those from FujiFilm) write the same serial number to all cards when they are formatted in camera.
This simplifies things for an application such as PhotoImport. Once a single card has been formatted in camera and registered by the camera then all cards formatted in any FujiFilm camera can be accessed without future security checks.
Note that when the card is reformatted using a computer - either when using the reformatter included as part of the OS or by using the formatter provided by the SD Card Association a the serial number will change. This means that the card will have to be registered again each time it is reformatted.
External Device Detection
Section titled “External Device Detection”There is also no way of detecting when a media device has been attached via a USB port unless it has been initialised using the DCF (Design rule for Camera File system) standard.
This requires that the root folder on the card contains a subfolder called DCIM (Digital Camera Images).
When this standard has been used Apple provides a module which allows applications to detect when a media device has been attached.
The same module is used to detect when a camera has been attached via USB to an iPad or iPhone.
This gives applications two techniques to detect when these devices have been attached to iPad or iPhone via USB:
-
run a timer loop and regularly attempt to use all bookmarks stored for registered image cards until one has been recognized
-
use the detection module
PhotoImport takes a hybrid approach:
-
for image cards of 64GB or larger the built-in detection module isused to identify that card has been attached and then the bookmark is used to grant access for reading files via the filesystem
-
for image cards smaller than 64GB the module detects the card has been attached and also uses the same module to read thumbnails and full image files
-
for registered backup SSDs the module is also used to detect the device has been attached, the bookmark is used to grant access and then the filesystem is used both for reading and writing backup files
-
for cameras the module is used for all processing - detecting that a camera has been attached and reading image files
