UIDocumentPickerViewController cannot associate thumbnails for text file

I am intializing a UIDocumentPickerViewController with the UTIs public.text and public.text-plain.

  UIDocumentPickerViewController* documentPickerController = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:[NSArray arrayWithObjects:@"public.text",@"public.text-plain",nil] inMode:UIDocumentPickerModeImport];

When selecting a text file I get the error message "Failed to associate thumbnails for picked URL file:///private/var/mobile/Library/Mobile%20Documents/com~apple~CloudDocs/NIC.txt with the Inbox copy file:///private/var/mobile/Containers/Data/Application/B857A5E7-74FE-4479-B899-B61D524B7E0D/tmp/***-Inbox/NIC.txt: Error Domain=QLThumbnailErrorDomain Code=102 "(null)" UserInfo={NSUnderlyingError=0x28250df20 {Error Domain=GSLibraryErrorDomain Code=3 "Generation not found" UserInfo={NSDescription=Generation not found}}}".


What can I do to get rid of this error message?

Replies

It seems that on my side, the startAccessingSecurityScopedResource() method throws an error and can not access the user Privacy settings. When looking in the iPhone Settings -> Privacy -> Files and Folders, my application doesn't appear and it seems that it has no access to this part of iOS. Have you been able to solve your question since?

No, could not solve it. I gave up; waiting on an update that might solve it.

I've had a similar message but I found out that it doesn't seem to have any effect on loading the file, so it can probably be ignored.