Realm.Sync.Session

An object encapsulating a Realm Object Server session. Sessions represent the communication between the client (and a local Realm file on disk), and the server (and a remote Realm at a given URL stored on a Realm Object Server). Sessions are always created by the SDK and vended out through various APIs. The lifespans of sessions associated with Realms are managed automatically.

config

Gets the Sync-part of the configuration that the corresponding Realm was constructed with.

Type:
object
state

Gets the current state of the session. Can be either:

  • "active": The session is connected to the Realm Object Server and is actively transferring data.
  • "inactive": The session is not currently communicating with the Realm Object Server.
  • "invalid": A non-recoverable error has occurred, and this session is semantically invalid. A new session should be created.
Type:
string
url

Gets the URL of the Realm Object Server that this session is connected to.

Type:
string
user

Gets the User that this session was created with.

Type:
User