When following the onsite IOS documentation for UIDocumentPickerViewController in Xcode 12.5.1 with IOS 14.5 deployment target I get an error:
Incorrect argument label in call (have 'forOpeningContentTypes:', expected 'forExporting:')
Any advice on how the usage of thie IOS UIDocumentPickerViewController is supposed to be used now?
My Code Except:
// Create a document picker for directories.
let documentPicker =
UIDocumentPickerViewController(forOpeningContentTypes: [.folder])
documentPicker.delegate = self
Snapshot of error:
Documentation for how to use document picker here:
https://developer.apple.com/documentation/uikit/view_controllers/providing_access_to_directories gives:
You forgot to
import UniformTypeIdentifiers