Why my app is not shown in iCloud Drive Folder

﹥>﹥吖頭↗ 提交于 2019-11-28 06:58:40
Afaq Ahmad

I have tried the same code in swift and got the same problem.

This is what worked for me :

1) Find the following lines in your info.plist source code

<key>CFBundleVersion</key>
<string>1</string>

2) Increase the version number. If it is 1, increase it to 2. Do the same whatever the version number is.

3) If needed, uninstall the app from your device and re-run it after following the above two steps

The only thing that worked for me (I had exactly the same issues) in an existing app (so I can't change the bundle ID) was to create a Documents subfolder under the URLForUbiquityContainerIdentifier folder and write all my files there.

Once I did this, they appeared in Finder on my Mac. However they did not appear in a Documents subfolder of my app's folder in iCloud Drive, they appeared directly in the app folder.

But nothing shown in my iCloud Drive folder in my mac or icloud.com. Why they are not showing my app's folder even everything looks like fine and there is no error?

Is this a new app or a newly created iCloud container? Then the reason is: NSUbiquitousContainerIsDocumentScopePublic=true only gets in effect once the app (and the entitled iCloud container) has been gone through review and approval.

I can't remember where I read that "missing piece of information" (at least i didn't get it from the Apple documentation).

Another example from my experience, which seems to prove this: In an existing app (with the "old style - TeamIdentifierPrefix" iCloud container) i can make that container visible on iCloud drive. But a new container won't be visible in iCloud Drive "to the public" (even tough I can see it using Terminal.app on my Mac). Once the app (with the new container) has been approved and is available on the AppStore, you can play again with the Info.plist (and make the new container visible/hidden, ...)

  1. Bump CFBundleVersion in Info.plist.
  2. Create a new iCound container on https://developer.apple.com/account/ios/identifier/cloudContainer
  3. Specify custom containers in Xcode. Untick the old containers and tick the new created container.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!