Hi,
I’m trying to use functionality similar to the Kotlin api:
result.addChangeListener { results, changeSet ->
if (changeSet == null) {
// The first time async returns with an null changeSet.
} else {
// Called on every update.
}
}
In Swift apparently I’ve to use:
results.observe { [weak self] (changes: RealmCollectionChange) in ... }
But the change doesn’t have the objects itself. I only need the objects, not indices.
Do I have to store results in an instance variable and just access it in the closure? Or how to I get the up to date results?
Thanks.