SyncConfiguration

interface SyncConfiguration : Configuration

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

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.Builder(user, "partition-value", setOf(YourRealmObject::class)).build()
val realm = Realm.open(config)

Types

Builder
Link copied to clipboard

Properties

encryptionKey
Link copied to clipboard
abstract val encryptionKey: ByteArray?
errorHandler
Link copied to clipboard
abstract val errorHandler: SyncSession.ErrorHandler?
log
Link copied to clipboard
abstract val log: LogConfiguration
maxNumberOfActiveVersions
Link copied to clipboard
abstract val maxNumberOfActiveVersions: Long
name
Link copied to clipboard
abstract val name: String
partitionValue
Link copied to clipboard
abstract val partitionValue: PartitionValue
path
Link copied to clipboard
abstract val path: String
schema
Link copied to clipboard
abstract val schema: Set<KClass<out RealmObject>>
schemaVersion
Link copied to clipboard
abstract val schemaVersion: Long
user
Link copied to clipboard
abstract val user: User