Reputation: 587
I'm working on a CloudKit app. Can fetchAllLongLivedOperationIDs
be used to handle offline changes?
What's the use of longLivedOperationWasPersistedBlock
?
I see that longLivedOperationWasPersistedBlock
gets called even when the app is offline
Upvotes: 5
Views: 492
Reputation: 1862
In order to work with CloudKit you must be online. Being offline returns a CKError detailed and Internet Connecction error.
fetchAllLongLivedOperationIDs only returns the operations IDs that are running or had finished in a short period of time.
If you goes offline you need some kind of local persitance engine. It could be Core Data, KeyedArchive or something like that.
Upvotes: 4