1

Currently, my app's data is stored locally by using Core Data. I want to keep this as default. In addition, I want to let users back up their data to iCloud if they choose to do so.

Using "iCloud with Core Data" was suggested for this purpose in 2017, but it was deprecated later.

In another answer it is mentioned that "iCloud with Core Data" was deprecated and there is not any replacement for "iCloud with Core Data", as of 2018.

Later, at one presentation in WWDC2019 it is said that CloudKit is a solution for backup, among other purposes. New features of Core Data to work with CloudKit were mentioned in this answer too. So it seems that CloudKit is the way to go but I am not sure.

Questions:

1) Is it a good idea to use CloudKit to let users back up their data (stored locally by Core Data) to iCloud optionally, or is there another, better choice?

2) As far as I understood, CloudKit is the only option to back up local Core Data store to iCloud as of 2020. With this assumption, what should be the steps generally for implementing this (optional backup to iCloud, with default, primary local Core Data storage) with CloudKit?

3) It seems that NSPersistentCloudKitContainer is only available for iOS 13+. Do you have any suggestion for supporting iOS 11 and iOS 12, if I use CloudKit for the above mentioned purpose?

Luke
  • 965
  • 8
  • 21

0 Answers0