Code Monkey home page Code Monkey logo

btcloudkitsync's People

Contributors

joulupukki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

jjrscott

btcloudkitsync's Issues

Fix up the sync notifications

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.

Add code to automatically delete unused CKSubscriptions

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.

Check to make sure all CKErrors that could happen are handled

Most of the main errors are already documented in other issues, but there are many errors declated in CKError.h:

  • CKErrorInternalError - CloudKit.framework encountered an error. This is a non-recoverable error.
  • CKErrorPartialFailure - Some items failed, but the operation succeeded overall
  • CKErrorNetworkUnavailable - Network not available
  • CKErrorNetworkFailure - Network error (available but CFNetwork gave us an error)
  • CKErrorBadContainer - Un-provisioned or unauthorized container. Try provisioning the container before retrying the operation.
  • CKErrorServiceUnavailable - Service unavailable
  • CKErrorRequestRateLimited - Client is being rate limited
  • CKErrorMissingEntitlement - Missing entitlement
  • CKErrorNotAuthenticated - Not authenticated (writing without being logged in, no user record)
  • CKErrorPermissionFailure - Access failure (save or fetch)
  • CKErrorUnknownItem - Record does not exist
  • CKErrorInvalidArguments - Bad client request (bad record graph, malformed predicate)
  • CKErrorResultsTruncated - Query results were truncated by the server
  • CKErrorServerRecordChanged - The record was rejected because the version on the server was different
  • CKErrorServerRejectedRequest - The server rejected this request. This is a non-recoverable error
  • CKErrorAssetFileNotFound - Asset file was not found
  • CKErrorAssetFileModified - Asset file content was modified while being saved
  • CKErrorIncompatibleVersion - App version is less than the minimum allowed version
  • CKErrorConstraintViolation - The server rejected the request because there was a conflict with a unique field.
  • CKErrorOperationCancelled - A CKOperation was explicitly cancelled
  • CKErrorChangeTokenExpired - The previousServerChangeToken value is too old and the client must re-sync from scratch
  • CKErrorBatchRequestFailed - One of the items in this batch operation failed in a zone with atomic updates, so the entire batch was rejected.
  • CKErrorZoneBusy - The server is too busy to handle this zone operation. Try the operation again in a few seconds.
  • CKErrorBadDatabase - Operation could not be completed on the given database. Likely caused by attempting to modify zones in the public database.
  • CKErrorQuotaExceeded - Saving a record would exceed quota
  • CKErrorZoneNotFound - The specified zone does not exist on the server
  • CKErrorLimitExceeded - The request to the server was too large. Retry this request as a smaller batch.
  • CKErrorUserDeletedZone - The user deleted this zone through the settings UI. Your client should either remove its local data or prompt the user before attempting to re-upload any data to this zone.

Add conflict resolution during local change upload

Add conflict resolution handling

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.

CKAsset and CKReference support?

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.