Reputation: 3163
I'm using CloudKit to fetch/store data but would also like to have a local persistence layer. Does CloudKit offer any kind of local storage capabilities? Or should I use NSUserDefaults (NSKeyedArchiver/NSKeyedUnarchiver)?
Upvotes: 8
Views: 4230
Reputation: 3862
No caching built in CloudKit, anyway when you implement one Keep in mind to cache only the system fields to restore and synch with CloudKit again check this https://stackoverflow.com/a/35355916/1787109
Upvotes: 0
Reputation: 13127
There is no mechanism for cashing data locally in CloudKit, you have to do that yourself. I can suggest you to take a look at EVCloudKitDao which is a convenience library for CloudKit that has support for local cashing to a file.
Upvotes: 3