Skip to content

Releases: 3lvis/Sync

Sync — 3.3.0

26 Jun 07:25
Compare
Choose a tag to compare
  • Add Objective-C support for syncing changes using Sync operations

Options

@objc public enum CompatibleOperationOptions: Int {
    case insert = 0
    case update = 1
    case delete = 2
    case insertUpdate = 3
    case insertDelete = 4
    case updateDelete = 5
    case all = 6
}

APIs

class func compatibleChanges(_ changes: [[String: Any]], inEntityNamed entityName: String, dataStack: DataStack, operations: CompatibleOperationOptions, completion: ((_ error: NSError?) -> Void)?)
class func compatibleChanges(_ changes: [[String: Any]], inEntityNamed entityName: String, predicate: NSPredicate?, dataStack: DataStack, operations: CompatibleOperationOptions, completion: ((_ error: NSError?) -> Void)?)

Sync — 3.2.3

27 Apr 08:53
Compare
Choose a tag to compare
  • Make persistentStoreCoordinator public

Sync — 3.2.1

19 Apr 10:53
Compare
Choose a tag to compare
  • Re-added iOS 8 support

Sync — 3.2.1

28 Mar 21:11
Compare
Choose a tag to compare
  • Fix Swift 3.1 Warnings (Xcode 8.3)

Sync — 3.2.0

26 Mar 09:37
Compare
Choose a tag to compare

Updated Core Data Model user info keys

Added support for:

  • sync.remoteKey
  • sync.isPrimaryKey
  • sync.nonExportable
  • sync.valueTransformer

This is backwards compatible, the hyper ones still work.

Improved JSON export API

Besides hyp_dictionary now you'll get a export() method.

More info about exporting here.

Sync — 3.1.0

22 Mar 14:06
Compare
Choose a tag to compare
  • Improved Sync helpers (#381)
// For example now you can do
dataStack.sync(objectsB, inEntityNamed: "User", operations: [.update], completion: nil)

// Instead of
Sync.changes(objectsB, inEntityNamed: "User", dataStack: dataStack, operations: [.update], completion: nil)
  • Improved performance when using operations filtering will be done only in the requested operations (#384)

  • Added support for deep-mapping for to-many relationships (#385)

  • Added support for sync.isPrimaryKey as an alternative to hyper.isPrimaryKey and sync.remoteKey to be used instead of hyper.remoteKey. All of this without breaking backward compatibility so you don't have to change anything. (#388 and #390)

Sync — 3.0.0

16 Mar 18:59
Compare
Choose a tag to compare
  • Bundled all the dependencies

Breaking changes

  • DATAStack renamed to DataStack
  • You might need to remove all your import DATAStack and replace it with import Sync
  • OperationOptions before .Insert, .Update, .Delete and .All, now .insert, .update, .delete and .all

Sync — 2.7.0

05 Jan 12:03
Compare
Choose a tag to compare

Sync — 2.6.3

04 Jan 09:02
Compare
Choose a tag to compare
  • Removed unused parameter from one of the sync methods

34a90cc

Sync — 2.6.2

10 Dec 14:32
Compare
Choose a tag to compare
  • Use Result type for NSPersistentContainer extension
persistentContainer.insertOrUpdate(json, inEntityNamed: "User") { result in
    switch result {
    case .success:
        // be happy
    case .failure(let error):
        // do something with error
    }
}