Documents never showed up in the "Recent" tab

321 Views Asked by At

I have an document-based iOS app which adopts the iOS 11's UIDocumentBrowserViewController. And it declares its own document type, which is a package file that conforms to com.apple.package.

(Here's the link to the app on App Store, and the package file is so called a "FlipBook", which is just a container that contains a sequence of images.)

I can create or edit documents through the standard document-browser workflows with no problem. However, none of the created nor edited documents shows up in the "Recent" tab of the document browser - nor the system's Files.app.

I've tried tweak my UTIs settings in the Info.plist file in multiple ways, but none of them worked. I also tried create a new project from the Xcode template (which has public.image as document type), but as long as I declared my own document type, it no longer appears in "Recent" tab. I can confirm that all the document being edited displays a correct modification date in the file browser - it's just never showed up the "Recent" tab.

Does anyone have any clues on what's missing there? Thanks a lot.

1

There are 1 best solutions below

0
On

Thanks Robin. The comments on June 18 helped me. I was troubled by the same problem. However, the situation is somewhat different. I will write a solution here, as there may be people who have the same trouble.

In addition to Robin's problem, In the case of me, the file is displayed in the Recents tab when the file is manipulated locally, but it is not displayed when saved in iCloud Drive.

The cause was NSUbiquitousContainerName. The Recents files are now displayed if NSUbiquitousContainerName is the same as the Bundle display name. I hope this information is useful for someone.