Sync

JSON to Core Data and back. Swift Core Data Sync.

OTHER License

Stars
2.6K
Committers
33

Bot releases are visible (Hide)

Sync - Sync — 1.12.3

Published by 3lvis about 8 years ago

Adds support for mapping camelCase to-one relationships. For example:

Model

JSON

{
    "id": 0,
    "legalTenant": {
      "id": 0
    }
}
Sync - Sync — 1.12.2

Published by 3lvis about 8 years ago

Check example here: https://github.com/hyperoslo/Sync/issues/254

Thanks to the stellar @RobinFalko for reporting this issue 👏 💐

Sync - Sync — 1.12.1

Published by 3lvis about 8 years ago

Thanks @achirkof for reporting this bug ❤️

Sync - Sync — 1.12.0

Published by 3lvis about 8 years ago

Updated NSManagedObject-HYPPropertyMapper to 4.0.0 which now moved all it's date parsing to DateParser. Head over the release notes for more information:

NSManagedObject-HYPPropertyMapper 4.0.0

Sync - Sync — 1.11.3

Published by 3lvis about 8 years ago

Sync - Sync — 1.11.2

Published by 3lvis about 8 years ago

Update NSManagedObject-HYPPropertyMapper to add support for deciseconds and microseconds in date parsing.

Sync - Sync — 1.11.1

Published by 3lvis about 8 years ago

Sync - Sync — 1.11.0

Published by 3lvis about 8 years ago

  • Improve NSOperation API with additional initializer #250
  • Fix bug with weak NSPredicate. Removing the weak holds the reference which is the expected behaviour #250
Sync - Sync — 1.10.2

Published by 3lvis about 8 years ago

  • Update DATAStack dependency to 5.4.0

https://github.com/3lvis/DATAStack/releases/tag/5.4.0

Sync - Sync — 1.10.1

Published by 3lvis about 8 years ago

  • Improved NSOperation completion callback

https://github.com/hyperoslo/Sync/pull/247

Sync - Sync — 1.10.0

Published by 3lvis about 8 years ago

Update dependencies:

DATAFilter from 0.10.0 to 0.11.0

It was completely rewritten in Swift, biggest change is that DATAFilterOperation is now DATAFilter.Operation.

https://github.com/3lvis/DATAFilter/releases/tag/0.11.0

DATAStack from 5.2.1 to 5.3.0

Added more initializers and some naming improvements to make it easier to support NSPersistentContainer in the future.

https://github.com/3lvis/DATAStack/releases/tag/5.3.0

Sync - Sync — 2.0.0 (Beta 1)

Published by 3lvis over 8 years ago

Swift 3 support.

Sync - Sync — 1.9.0

Published by 3lvis over 8 years ago

Add support for operation types

Adds support for selecting different operation types, so far Sync has being inserting items found in JSON but not locally, removing items found locally but not in JSON and updating items found both in JSON and locally. This vesion allows you to change that, so you can choose to just insert, just delete, just update or any combination of those things.

PR: https://github.com/hyperoslo/Sync/pull/223

let firstImport = // First import of users
Sync.changes(firstBatch, inEntityNamed: "User", dataStack: dataStack, operations: [.All]) {
    // All users have been imported, they are happy 
}

// Likely after some changes have happened, here usually Sync would remove the not found items
let secondImport = // Second import of users
Sync.changes(secondImport, inEntityNamed: "User", dataStack: dataStack, operations: [.Insert, .Update]) {
    // Here new users have been imported, existing users have been updated, and not found users have been ignored
}

Others

  • Improved multithreading safety
Sync - Sync — 1.8.1

Published by 3lvis over 8 years ago

Sync - Sync — 1.8.0

Published by 3lvis over 8 years ago

Cancelling Sync operations

Since now Sync is a subclass of NSOperation the sky is the limit! 😱
Issues: #216 #93

let operation = Sync(changes: users, inEntityNamed: "User", predicate: nil, dataStack: dataStack)
operation.start()

Better simplified workflows

The handling of syncing relationships by providing only the id instead of the full JSON object has been improved.
Issues: #215 #218 #220

Checkout the simplified sections for more information.

https://github.com/hyperoslo/Sync#one-to-many-simplified

https://github.com/hyperoslo/Sync#one-to-one-simplified

By the way, even though is not documented yet, this also works with many-to-many without problems.

Sync - Sync — 1.7.2

Published by 3lvis over 8 years ago

Sync - Sync — 1.7.1

Published by 3lvis over 8 years ago

Sync - Sync — 1.7.0

Published by 3lvis over 8 years ago

Update internal APIs, dependencies and README's to encourage usage of id instead of remoteID for the local primary key.

Sync - Sync — 1.6.8

Published by 3lvis over 8 years ago

  • Updated NSManagedObject-HYPPropertyMapper to 3.6.2. Basically just removes those awful printf and NSLogs

https://github.com/hyperoslo/NSManagedObject-HYPPropertyMapper/releases/tag/3.6.2

Sync - Sync — 1.6.7

Published by 3lvis over 8 years ago

  • Update NSManagedObject-HYPPropertyMapper to 3.6.1

Fix bug where miliseconds weren't taken in account (https://github.com/hyperoslo/NSManagedObject-HYPPropertyMapper/pull/105)

Package Rankings
Top 16.93% on Carthage
Top 1.36% on Cocoapods.org