Title
iOS App detecting external USB mass storage connection without user interaction
Background
We are developing an iOS application that connects to an action camera device via Bluetooth and Wi-Fi for control and data transfer.
In addition to wireless connectivity, our product requirements include supporting USB Mass Storage mode, where the camera (or a generic USB flash drive) is connected to an iPhone using a Lightning / USB-C adapter and appears in the Files app as an external drive.
Requirement
Our app needs to detect when an external USB mass storage device is connected or disconnected, with the following constraints:
- The app is already running in the foreground
- No user interaction is performed (no button tap, no document picker, no import UI)
- The USB device can be:
- A generic USB flash drive
- An empty USB drive (no photos or videos)
- The app only needs to know:
- Whether an external USB storage device has been connected or removed
- No need to access device identity, vendor info, or low-level USB details
The expected behavior is simply to update the app’s internal state or UI when a USB storage device becomes available.
Investigation Performed
We have already investigated and tested the following public and documented approaches, all of which did not provide a reliable or any notification for USB mass storage insertion:
- ExternalAccessory / MFi
- Not applicable for generic USB storage devices
- Darwin notifications / CoreFoundation
- Using notify_register_dispatch and CFNotificationCenterGetDarwinNotifyCenter
- System USB / storage related notifications do not fire for third-party apps
- File system APIs
- NSFileManager mountedVolumeURLsIncludingResourceValuesForKeys
- On iPhone, external USB drives visible in the Files app are not exposed as mounted volumes to third-party apps
- FileProvider / DocumentPicker
- Only provides access after explicit user interaction
- No background or passive notification of availability
- ImageCaptureCore
- Limited to PTP camera devices
- Does not apply to generic USB mass storage
Based on our testing, none of the public APIs provide a way to detect USB mass storage insertion automatically without user interaction.
Question to Apple
We would like to confirm the official platform behavior and capability boundary:
- Is there any public, documented, App Store–approved API on iOS that allows a third-party app to be notified when a generic USB mass storage device is connected or disconnected, without user interaction?
- If not:
- Is this limitation intentional by platform design?
- Is the recommended approach to rely exclusively on user-initiated document access flows (e.g. document picker, import UI)?
- Are there any recommended best practices for apps that need to update their UI or internal state based on the availability of external USB storage devices?
Our goal is to ensure that our implementation fully complies with iOS platform guidelines and App Store Review requirements.
Environment
- iOS versions tested: iOS 18 (latest public release)
- Devices: iPhone models with Lightning / USB-C
- USB devices: generic USB flash drives (including empty drives)
Closing
We appreciate clarification on whether this capability is intentionally restricted on iOS and how Apple recommends designing user experience around external USB storage access.
Thank you for your guidance.
Is there any public, documented, App Store–approved API on iOS that allows a third-party app to be notified when a generic USB mass storage device is connected or disconnected, without user interaction?
No.
Is this limitation intentional by platform design?
It's largely intentional, partly driven by privacy/security concerns, partly by the fact that iOS has very different storage usage patterns than macOS (or any "traditional" operating system). Notably, usage of cloud storage solutions (iCloud Drive, Dropbox, etc.) is far more common/important on iOS than it is in macOS.
Is the recommended approach to rely exclusively on user-initiated document access flows (e.g. document picker, import UI)?
Honestly, it's really the only truly viable option. Notably, bookmarks may be able to restore access across app runs in some circumstances, but the bug I described here means that they're not reliable enough for a volume-focused product to rely on.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware