I use this method to show an UIDocumentPicker:
func showDocumentPicker(){
let docPicker = UIDocumentPickerViewController(documentTypes: ["public.composite-content "], inMode: UIDocumentPickerMode.Import)
docPicker.delegate = self
docPicker.modalPresentationStyle = UIModalPresentationStyle.FullScreen
self.presentViewController(docPicker, animated: true, completion: nil)
}
The UIDocumentPicker gets displayed nicely, but it always shows
No Document, Documents in iCloud Drive are not available because the iCloud Documents & Data setting is disabled
But when I check the iCloud Status, iCloud Drive is enabled! (My App even shows up in the settings there, also enabled!)
This happens in Simulator and on the device (via a Prerelease distributed by Apple TestFlight)
This error can be caused due to invalid UTI-constants:
Make sure to double-check the UTIs you pass to the documentTypes
parameter. In this case, note the blank space in the public.composite-content
string
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With