admin管理员组文章数量:1390334
I have an app that stores user created JSON files successfully saving and loading to the local application documents directory. This directory is visible to the user. I would like to allow the user to upload them to iCloud in the ubiquity_container/Documents directory so that the files are synced to iCloud Drive.
My attempts to do this have failed and I think it's because I don't understand what the ubiquity container is. Is the iCloud Ubiquity container a folder? How do I save files into that ubiquity container/folder? Is saving to the ubiquity container separate from saving to to the application documents directory or does the application documents directory == the ubiquity container if I enable iCloud in the app?
I'm exploring this documentation Apple iCloud Documents
I have all entitlements correctly setup that I need to display the app documents directory in iCloud and locally so that the user can see them. This should work between devices on iOS and macOS (same container for both the mobile and desktop versions of the app.)
A high level view of what the ubiquity container is or is doing would be helpful. (For example, is it a folder or not; do you save files there instead of or in addition to the app documents directory; beyond the entitlements, do you need to do more in your code to save a file there or does the ubiquity container become the application documents directory, etc).
I have an app that stores user created JSON files successfully saving and loading to the local application documents directory. This directory is visible to the user. I would like to allow the user to upload them to iCloud in the ubiquity_container/Documents directory so that the files are synced to iCloud Drive.
My attempts to do this have failed and I think it's because I don't understand what the ubiquity container is. Is the iCloud Ubiquity container a folder? How do I save files into that ubiquity container/folder? Is saving to the ubiquity container separate from saving to to the application documents directory or does the application documents directory == the ubiquity container if I enable iCloud in the app?
I'm exploring this documentation Apple iCloud Documents
I have all entitlements correctly setup that I need to display the app documents directory in iCloud and locally so that the user can see them. This should work between devices on iOS and macOS (same container for both the mobile and desktop versions of the app.)
A high level view of what the ubiquity container is or is doing would be helpful. (For example, is it a folder or not; do you save files there instead of or in addition to the app documents directory; beyond the entitlements, do you need to do more in your code to save a file there or does the ubiquity container become the application documents directory, etc).
Share Improve this question edited Mar 12 at 18:05 Warren Burton 17.4k3 gold badges55 silver badges76 bronze badges asked Mar 12 at 12:48 Jason HoltJason Holt 11512 bronze badges1 Answer
Reset to default 1I would suggest to check these 2012 WWDC sessions:
209 - iCloud storage overview
237 - Advanced iCloud document storage
A high-level overview is available here.
In short, ubiquity container is a folder that allows you to coordinate its contents on reading and writing from multiple devices, and resolve the conflicts that such CRUD operations may produce.
本文标签: iosWhat is a ubiquity container in iCloud Documents storageStack Overflow
版权声明:本文标题:ios - What is a ubiquity container in iCloud Documents storage? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744751671a2623217.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论