Skip to content

Releases: 3lvis/Sync

Sync — 2.6.1

10 Dec 07:52
Compare
Choose a tag to compare
  • Improved NSPersistentContainer extension

Insert or update

persistentContainer.insertOrUpdate(json, inEntityNamed: "User") { id, error in
    //...
}

Update

persistentContainer.update("id", with: ["name": "bossy"], inEntityNamed: "User") { id, error in
    //...
}

Delete

persistentContainer.delete("id", inEntityNamed: "User") { error in
    //...
}

Sync — 2.6.0

10 Dec 02:04
Compare
Choose a tag to compare
  • Adds a helper to use Sync as an extension of NSPersistentContainer
persistentContainer.sync(objects, inEntityNamed: "NormalUser") { error in
    //....
}

Sync — 2.5.0

03 Dec 15:00
Compare
Choose a tag to compare
  • Improved NSPersistentContainer support #329
  • Improved NSOperation support #331
  • Added helper methods

Fetch

let fetched = try! Sync.fetch("id", inEntityNamed: "User", using: dataStack.mainContext)

Insert or update

try! Sync.insertOrUpdate(["id": "id", "name": "name"], inEntityNamed: "User", using: context)

Update

try! Sync.update("id", with: ["name": "Elvis"], inEntityNamed: "User", using: context)

Delete

try! Sync.delete("id", inEntityNamed: "User", using: context)

Sync — 2.4.0

29 Nov 22:53
Compare
Choose a tag to compare
  • Fixes an issue where ordered relationships wouldn't maintain their order #233

This one couldn't be possible without the help from the fantastic @dersvenhesse! Thanks <3

  • Fix issue cleaning to-one relationship using ID #320
  • Add willInsert delegate. Called before the JSON is used to create a new NSManagedObject.
  • Add support for NSPersistentContainer
public class func changes(_ changes: [[String : Any]], inEntityNamed entityName: String, predicate: NSPredicate?, persistentContainer: NSPersistentContainer, completion: ((_ error: NSError?) -> Void)?) {

Sync — 2.3.4

24 Oct 17:14
Compare
Choose a tag to compare
  • Renamed Sync.Operation to Sync.OperationOptions
  • Made Sync.OperationOptions options public

Sync — 2.3.3

23 Oct 15:07
Compare
Choose a tag to compare

Add date format: 2016-10-10 07:00:00

Sync — 2.3.2

23 Oct 13:54
Compare
Choose a tag to compare
  • Added Carthage support
  • Improved headers, now DATAFilter.Operation is Sync.Operation

Sync — 2.3.1

21 Oct 13:35
Compare
Choose a tag to compare

💐 🎉 Thanks @ricardo0100 🎉 💐

Sync — 2.3.0

21 Oct 10:42
Compare
Choose a tag to compare
  • Changed NSManagedObject_HYPPropertyMapper with SYNCPropertyMapper.

You might need to replace any:

import NSManagedObject_HYPPropertyMapper

With:

import SYNCPropertyMapper

And:

// Before
hyp_remote

// After
hyp_snakeCase
// Before
hyp_local

// After
hyp_camelCase

Sync — 1.16.1

21 Oct 13:39
Compare
Choose a tag to compare

💐 🎉 Thanks @ricardo0100 🎉 💐