write

abstract fun MutableSubscriptionSet.write(realm: Realm)

Closure for adding or modifying the initial SubscriptionSet, with the MutableSubscriptionSet as the receiver. This mirrors the API when using SubscriptionSet.update and allows for the following pattern:

val user = loginUser()
val config = SyncConfiguration.Builder(user, schema)
.initialSubscriptions { realm: Realm -> // this: MutableSubscriptionSet
add(realm.query<Person>())
}
.waitForInitialRemoteData(timeout = 30.seconds)
.build()
val realm = Realm.open(config)