Reputation: 6346
I am trying to add iCloud drive capabilities to my existing iPhone app, basically just to be able to store files in iCloud drive, such that the user has access to them on all his devices.
I have followed the steps to enable iCloud drive capabilities:
NSUbiquitousContainers
key to the Info.plist
.Documents
folder in the ubiquity container existsDocuments
folder at start-up.So far, it is working locally on the iPhone: the app folder is visible in the Files
app on the same phone, and the test file is visible there as well.
But the app folder is not visible on iCloud.com, and not in Finder on my MacBook. I can see the Downloads
folder with the same content in iCloud Drive on both platforms, so I am sure that I am logged in with the same AppleID as on the iPhone.
What else do I need to do to make the app folder visible in iCloud? If it is an issue because the app update has not been released yet, how can I test the functionality before releasing it?
I have looked at other questions that have encountered the same problems, such as this and this, but I think I have done all the steps recommended in those answers (the practical ones, requesting a new AppID is obviously not possible for an existing app).
The Apple documentation is extremely bloated, so it is hard to distill what the basic steps are that you need to follow.
Info.plist settings (obviously with MyApp
replaced with my app's name):
<key>NSUbiquitousContainers</key>
<dict>
<key>iCloud.com.MyApp.MyApp</key>
<dict>
<key>NSUbiquitousContainerIsDocumentScopePublic</key>
<true/>
<key>NSUbiquitousContainerName</key>
<string>MyApp</string>
<key>NSUbiquitousContainerSupportedFolderLevels</key>
<string>Any</string>
</dict>
</dict>
Upvotes: 4
Views: 1724
Reputation: 6346
It seems to be that the answer is: just wait. I did not change anything in the code, and did not even run it again. A day later the files and folders showed up both on icloud.com and on my MacBook.
Strange that it takes so long, though.
Upvotes: 3