skjiisa / Character-Tracker

Elder Scrolls character tracker for iOS
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

Add CloudKit sync #113

Open skjiisa opened 3 years ago

skjiisa commented 3 years ago

The difficult part of this is going to be not having duplicates of the preloaded data.

If CloudKit syncs before data is preloaded, then this shouldn't be too big of an issue, as the data preload will simply reference the existing objects. It will override it though, so if the user changed any of it it'll revert back to default.

If this is how this works, this could be remedied by checking if there is data already before preloading. Updates would then have to be handled differently though, having a new internal JSON file per update. That maybe should be how it's done anyway though.

If the preload is run before the CloudKit sync then you'll likely end up with duplicate entries every time you install the app on a new device.

skjiisa commented 3 years ago

I actually don't think there's much of a reason to add this. I think being able to export characters and maybe do bulk exports would be enough and could potentially even be better than iCloud sync.