Я пытаюсь запустить зависимость от Cocoapod ios-PDF-Reader , и когда я выбираю pdf на своем телефоне через приложение "Файлы", я получаю следующую ошибку:
[DocumentManager] Failed to associate thumbnails for picked URL file:///private/var/mobile/Containers/Data/Application/../../Welcome.pdf
with the Inbox copy file:///private/var/mobile/Containers/Data/Application/../../tmp/com../Welcome.pdf:
Error Domain=QLThumbnailErrorDomain Code=102 "(null)"
UserInfo={NSUnderlyingError=0x28226cf90 {Error Domain=GSLibraryErrorDomain Code=3 "Generation not found"
UserInfo={NSDescription=Generation not found}}}
Кто-нибудь получил не удалось связать ошибку миниатюры раньше? и есть ли простое решение для этого? Вот код, где он ломается:
extension TestPdfEpubViewController: UIDocumentPickerDelegate {
func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentsAt urls: [URL]) {
guard let selectedFileURL = urls.first else { return }
//create pdf first
let documentFileURL = Bundle.main.url(forResource: selectedFileURL.absoluteString, withExtension: "pdf")!
let document = PDFDocument(url: documentFileURL)!
//then display the pdf
let readerController = PDFViewController.createNew(with: document)
navigationController?.pushViewController(readerController, animated: true)
}
}