Can I transfer CloudKit data to a new container?

I am creating a CloudKit application, and I was faced with the choice of storing my data in a default container, accessible only to this application, or a custom container that can exchange data. At the moment, I only need this application to access the data, so I would probably put my data in the default container. However, if I ultimately want to access this data from another application, can I transfer my user data to a user shared container?

+1
source share
1 answer

You do not need to transfer data: the default container can be used from other applications.

You can specify the name of your default source container in new CloudKit applications, and then use it to initialize CKContainer to access it.

See this answer “SO” and “Sharing containers between applications” and “Include iCloud and choose CloudKit” in this Apple document for details.

+1
source

Source: https://habr.com/ru/post/1668450/


All Articles