realm-swift
realm-swift copied to clipboard
Asymmetric Sync
Add Support for asymmetric sync. When an object inherit from AsymmetricObject
is immediately
marked as asymmetric, upon creation this objects is sync'd unidirectionally and cannot be query
locally.
class PersonObject: AsymmetricObject {
@Persisted(primaryKey: true) var _id: ObjectId = ObjectId.generate()
@Persisted var name: String
@Persisted var age: Int
}
try realm.write {
let person = PersonObject(name: "Dylan", age: 20, isFavorite: true)
realm.create(person) // This will create the object and sync'd unidirectionally.
}
@tgoyne seems like the CI failures doesn't have anything to do with the PR, I don't know the reason the test are not able to execute.