SyncConfiguration

A SyncConfiguration is used to setup a Realm Database that can be synchronized between devices using Atlas Device Sync.

A valid User is required to create a SyncConfiguration. See Credentials and App.login for more information on how to get a user object.

A minimal SyncConfiguration can be found below.

    val app = App.create(appId)
val user = app.login(Credentials.anonymous())
val config = SyncConfiguration.create(user, "partition-value", setOf(YourRealmObject::class))
val realm = Realm.open(config)

Types

Link copied to clipboard

Used to create a SyncConfiguration. For common use cases, a SyncConfiguration can be created using the SyncConfiguration.create function.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val encryptionKey: ByteArray?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Configuration options if downloading initial data from the server has been enabled for this realm.

Link copied to clipboard

Configuration options if initial subscriptions have been enabled for this realm.

Link copied to clipboard
abstract val inMemory: Boolean
Link copied to clipboard
Link copied to clipboard
abstract val name: String
Link copied to clipboard
abstract val path: String
Link copied to clipboard
abstract val schema: Set<KClass<out BaseRealmObject>>
Link copied to clipboard
abstract val schemaVersion: Long
Link copied to clipboard

Strategy used to handle client reset scenarios.

Link copied to clipboard
abstract val syncMode: SyncMode

The mode of synchronization for this realm.

Link copied to clipboard
abstract val user: User