Coder221
Coder221

Reputation: 1433

How to persist core data in cloud without authentication

I am designing an app using core data which has a local Cache. I am thinking of using CloudKit for syncing it across multiple iOS devices. Since CloudKit is not for persisting data, I am pretty sure that if user loses their phone that data is gone forever. My app doesn't require any authentication so how do I save the data in cloud along with local Cache so that it can be sync across multiple iOS devices like iPad or iWatch

P.S. Is it possible to save user generated content files in Documents so that they can get backed up by iCloud automatically without using CloudKit?

Upvotes: 0

Views: 506

Answers (2)

leaner122
leaner122

Reputation: 657

The data is backed up on iTunes and iCloud periodically, so if your user changes the device then they can restore the data from there.Yes it is possible to save user generated content files in Documents so that they can get backed up by iCloud automatically without using CloudKit

Upvotes: 1

Shobhakar Tiwari
Shobhakar Tiwari

Reputation: 7892

As per your problem , Only creating Coredata enables you to manage data across different devices but two important question need to understand before this :

  1. How can you preload existing data into the SQLite database?
  2. How can you use an existing SQLite database in Xcode project?

Here is one of hot favourite tutorial for managing this :

https://www.raywenderlich.com/27657/how-to-perform-a-lightweight-core-data-migration

Upvotes: 0

Related Questions