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
keyNSUbiquitousContainers/key
dict
keyiCloud.com.TeamName.AppName/key
dict
keyNSUbiquitousContainerIsDocumentScopePublic/key
true/
keyNSUbiquitousContainerName/key
stringAppName/string
keyNSUbiquitousContainerSupportedFolderLevels/key
stringAny/string
/dict
/dict
These are the values in the entitlement file
keycom.apple.developer.icloud-container-identifiers/key
array
stringiCloud.com.TeamName.AppName/string
/array
keycom.apple.developer.icloud-services/key
array
stringCloudDocuments/string
/array
keycom.apple.developer.ubiquity-container-identifiers/key
array
stringiCloud.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?