SyncConfiguration
public struct SyncConfiguration
A SyncConfiguration
represents configuration parameters for Realms intended to sync with
a Realm Object Server.
-
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
-
Whether the SSL certificate of the Realm Object Server should be validated.
Declaration
Swift
public let enableSSLValidation: Bool
-
Whether this Realm should be opened in ‘Query-based synchronization’ mode. Query-based synchronization mode means that no objects are synchronized from the remote Realm except those matching queries that the user explicitly specifies.
-warning: Query-based synchronization is a tech preview. Its APIs are subject to change.
Declaration
Swift
public let isPartial: Bool
-
Initialize a sync configuration with a user and a Realm URL.
Additional settings can be optionally specified. Descriptions of these settings follow.
enableSSLValidation
is true by default. It can be disabled for debugging purposes.Warning
The URL must be absolute (e.g.
realms://example.com/~/foo
), and cannot end with.realm
,.realm.lock
or.realm.management
.Warning
NEVER disable SSL validation for a system running in production.
Declaration
Swift
public init(user: SyncUser, realmURL: URL, enableSSLValidation: Bool = true, isPartial: Bool = false)