Documents folder of my app not shown in iCloud Drive in Finder

The problem is that the iCloud Drive directory of my app does not appear in my iCloud Drive in Finder despite the (I think) correct settings in my info.plist file (see below).

In Terminal, I can see the folder and it also contains .txt files.

What can I do to make the folder visible in Finder and the Files app?

<key>NSUbiquitousContainers</key> <dict> <key>iCloud.vmk.NewsSwiper</key> <dict> <key>NSUbiquitousContainerIsDocumentScopePublic</key> <true/> <key>NSUbiquitousContainerName</key> <string>RSS-Filter</string> <key>NSUbiquitousContainerIdentifier</key> <string>iCloud.vmk.NewsSwiper</string> <key>NSUbiquitousContainerSupportedFolderLevels</key> <string>Any</string> </dict> </dict>

Answered by DTS Engineer in 824577022

This question seems to be answered in the following post:

Folks typically fix the issue by strictly following the steps detailed in Publish an iCloud container to iCloud Drive.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

This question seems to be answered in the following post:

Folks typically fix the issue by strictly following the steps detailed in Publish an iCloud container to iCloud Drive.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

@DTS Engineer I have the same issue, and follow the documentation you provided for an existing app, but still cannot see the folder in iCloud Drive, although it exists there to be seen with Terminal. I tried with new projects, this works. I do the following:

  • Add iCloud tab in Signing & Capabilities, and tick "iCloud Documents", then create a Container.
  • add info.plist and fill NSUbiquitousContainers with my own Container's name.
  • In code, create a text file at FileManager.default.url(forUbiquityContainerIdentifier: nil)?.appending(component: "Documents")

I also tried increasing the Build number, or even main version number, but in vain. The documentation reads: "The system only updates an app’s iCloud container metadata when detecting a new version". Can you explain how does this work exactly? Where does the system stores the former version of my app. Can I let my system "forget" my app, so I can start the version over again, by deleting that version file?

Also, how can I solve it for my existing app?

As far as I know, the system looks into your app bundle after your app is installed, finds the CFBundleVersion value from the Info.plist, and compare it with the highest value ever used using compare(_:options:range:) + NSString.CompareOptions.numeric. Only if the curent version is higher, does the system update the iCloud container metadata.

If, for some reason, you ever set a high value for CFBundleVersion, which often happens in the debugging phase, the value will be remembered and used in the above comparison.

The metadata is synchronized to iCloud, and there is no way I am aware of that can resets the data, which is indeed inconvenient in the development phase.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Documents folder of my app not shown in iCloud Drive in Finder
 
 
Q