tôi sử dụng phương pháp này để hiển thị một UIDocumentPicker:UIDocumentPickerViewController -> "Không Documents" vì iCloud không có sẵn
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)
}
Các UIDocumentPicker được hiển thị độc đáo, nhưng nó luôn luôn hiển thị
Không Document, Documents trong iCloud Drive không khả dụng vì Tài liệu iCloud & Cài đặt dữ liệu bị tắt
Nhưng khi tôi kiểm tra Trạng thái iCloud, iCloud Drive được bật! (App của tôi thậm chí còn xuất hiện trong các thiết lập ở đó, cũng được kích hoạt!)
Điều này xảy ra trong mô phỏng và trên thiết bị (thông qua một Prerelease phân phối bởi Apple TestFlight)