I'm attempting to use AVExternalStorageDevice.requestAccess
on iOS 18 using Xcode 16.
When calling requestAccess
, a dialog does appear, but the completionHandler
closure is never called to indicate whether access was granted. If using the async version, the function just never returns.
Calling requestAccess
also results in a mediaServicesWereReset
(-11819) error without fail.
Supposedly, "the system only presents the dialog to a person the first time your app calls the method." That also doesn't appear to be the case. The dialog appears every time requestAccess
is called, regardless of previous invocations and whether "Allow" or "Don't Allow" was selected.
The dialog itself says "You can change this in Privacy settings." I cannot find this permission anywhere in the Settings app, neither under Privacy & Security nor under the app-specific settings page.
Has anyone else experienced these issues? Am I missing something here? I did suspect permissions issues and tried adding a NSRemovableVolumesUsageDescription
entry to the app. This did not appear to change anything.