4

I have an app that needs to store video files in it's own container folder in iCloud Drive. I have tried suggestions from most forums and I still couldn't resolve this issue.

These are the things I did to setup a cloud container for my app -

  • Added iCloud capability. Selected 'iCloud Documents' for Services and selected the appropriate iCloud container that I had created through my developer account.

  • Added the following entry in Info.plist

    <key>NSUbiquitousContainers</key>
    <dict>
    <key>iCloud.com.TeamName.AppName</key>
    <dict>
    <key>NSUbiquitousContainerIsDocumentScopePublic</key>
    <true/>
    <key>NSUbiquitousContainerName</key>
    <string>AppName</string>
    <key>NSUbiquitousContainerSupportedFolderLevels</key> 
    <string>Any</string>
    </dict>
    </dict>
  • These are the values in the entitlement file
<key>com.apple.developer.icloud-container-identifiers</key>
<array>
<string>iCloud.com.TeamName.AppName</string>
</array>
<key>com.apple.developer.icloud-services</key>
<array>
<string>CloudDocuments</string>
</array>
<key>com.apple.developer.ubiquity-container-identifiers</key>
<array>
<string>iCloud.com.TeamName.AppName</string>
</array>
  • Have tried with new bundle identifiers and cloud containers.

  • Have tried updating the Version and the Build value

The app folder is created at '/Users/{user}/Library/Mobile\ Documents/iCloud~com~TeamName~AppName/Documents' and I can see the files I've written to it.

I can find these files at iCloud -> Manage Storage -> AppName on my iPhone too.

Will 'NSUbiquitousContainerIsDocumentScopePublic' be accepted as true only when an app is released on the Appstore? Or it's just that I'm missing something here?

1 Answers1

3

Same here, I followed every tip I could find here and on other websites, but still the folder / files are not showing up visibly.

Problem: ubiquitous container works, files can be read and written, but are not showing up in macOS Finder, nor in the Files app on iOS devices. macOS 11.5, iOS 14.7, Xcode 12.5.1

I have tried:

It is driving me crazy. Who can help?

hotdogsoup.nl
  • 1,078
  • 1
  • 9
  • 22