joulupukki / btcloudkitsync Goto Github PK
View Code? Open in Web Editor NEWA class that provides simple CloudKit sync for iOS apps with a local cache/database.
License: Apache License 2.0
A class that provides simple CloudKit sync for iOS apps with a local cache/database.
License: Apache License 2.0
Originally the sync was arranged serially and there would be a begin sync, sync messages, and an end sync. Now that the code has changed around, fix up the sync notifications so the UI can display proper sync messages if desired.
I believe that all that needs to happen is:
While uploading records, CloudKit may respond with CKErrorLimitExceeded to indicate that the request to the server is too large. According to the WWDC video on CloudKit (I think the Tips & Tricks video), the number of records should be chopped in half and sent again to the server.
From CKError.h:
Saving a record would exceed quota
Describe registering for silent push notifications, how to implement the BTCloudKitSyncDatabase protocol, and strategies for implementing a local cache (database).
If the developer changes the BTCloudKitSyncDatabase implementation and provides a different recordZoneName, we'll want to delete any old subscriptions because the implementation appends "Subscription" to the recordZoneName.
From CKError.h:
One of the items in this batch operation failed in a zone with atomic updates, so the entire batch was rejected.
Most of the main errors are already documented in other issues, but there are many errors declated in CKError.h:
Hi any info on why we should use this over CloudKit iCloud Core Data? Thanks.
If the developer changes the BTCloudKitSyncDatabase implementation and provides a different recordZoneName, we'll want to delete any old zones.
BTCloudKitSync does not yet handle conflict resolution. Need to determine a good policy for how to deal with this. Should server or client changes "win" in a conflict. Part of dealing with this is also figuring out how to deal with the NSOperation that's currently pushing changes and re-sending the conflicted records.
Hi,
This looks like a great project. Just what I was looking for. However, how does it handle CKAsset and CKReference objects?
I need to be able to store a variable amount of attachments on a record and I thought maybe creating multiple child CKRecords and using CKReference to link them back to the parent CKRecord might be a way of doing that, each related record having its own CKAsset object on it.
Is there any planned support for that?
Looking at the code I wonder if it would be better to allow the delegate to provide the CKRecord objects to sync rather than providing an array of NSDictionary objects? If it was that way, then I could provide an array of CKRecord objects which already had their relationships to other CKRecord objects established and already populated with their CKAsset fields.
Thanks,
Brendan
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.