Releases: 3lvis/Sync
Releases · 3lvis/Sync
Sync — 3.3.0
- 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
- Make persistentStoreCoordinator public
Sync — 3.2.1
- Re-added iOS 8 support
Sync — 3.2.1
- Fix Swift 3.1 Warnings (Xcode 8.3)
Sync — 3.2.0
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
- 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 tohyper.isPrimaryKey
andsync.remoteKey
to be used instead ofhyper.remoteKey
. All of this without breaking backward compatibility so you don't have to change anything. (#388 and #390)
Sync — 3.0.0
- Bundled all the dependencies
Breaking changes
DATAStack
renamed toDataStack
- You might need to remove all your
import DATAStack
and replace it withimport Sync
- OperationOptions before
.Insert
,.Update
,.Delete
and.All
, now.insert
,.update
,.delete
and.all
Sync — 2.7.0
- Updated to DATAStack 7.0.1 https://github.com/SyncDB/DATAStack/releases
Sync — 2.6.3
- Removed unused parameter from one of the sync methods
Sync — 2.6.2
- 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
}
}