SyncConfiguration

public struct SyncConfiguration

A SyncConfiguration represents configuration parameters for Realms intended to sync with a Realm Object Server.

  • The SyncUser who owns the Realm that this configuration should open.

    Declaration

    Swift

    public let user: SyncUser
  • The URL of the Realm on the Realm Object Server that this configuration should open.

    Warning

    The URL must be absolute (e.g. realms://example.com/~/foo), and cannot end with .realm, .realm.lock or .realm.management.

    Declaration

    Swift

    public let realmURL: URL
  • How the SSL certificate of the Realm Object Server should be validated.

    Declaration

    Swift

    public let serverValidationPolicy: ServerValidationPolicy
  • Whether this Realm should be a fully synchronized Realm.

    Synchronized Realms comes in two flavors: Query-based and Fully synchronized. A fully synchronized Realm will automatically synchronize the entire Realm in the background while a query-based Realm will only synchronize the data being subscribed to. Synchronized realms are by default query-based unless this boolean is set.

    Declaration

    Swift

    public let fullSynchronization: Bool
  • The prefix that is prepended to the path in the HTTP request that initiates a sync connection. The value specified must match with the server’s expectation. Changing the value of urlPrefix should be matched with a corresponding change of the server’s configuration. If no value is specified here then the default /realm-sync path is used.

    Declaration

    Swift

    public let urlPrefix: String?