Well, that's a bummer 😅
Having a second local database and figuring out when and what to copy to the "real" database seems quite complicated 🤔. I'd have to track all incoming changes from CloudKit, map them to their respective tables and then attempt to copy the inserted data (in the correct order) whenever a batch has been handled. If it fails, I try again with the next batch. If it succeeds, I delete the data from the "CloudKit" local database.
But that doesn't even cover outgoing changes, which I would have to handle as well.
I'm not sure I can do this without missing a gazillion edge cases 😅.
But thanks for your answer :) This at least helps me a bit with the decision whether or not I should continue working on iCloud sync. I'm gonna think about this a bit more. Maybe it's possible to do it. I feel like I'm really close, but the lack of data integrity with CloudKit might just be too much.
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags: