RLMSyncConfiguration
@interface RLMSyncConfiguration : NSObject
A configuration object representing configuration state for a Realm which is intended to sync with a Realm Object Server.
-
The user to which the remote Realm belongs.
Declaration
Objective-C
@property (nonatomic, readonly) RLMSyncUser *_Nonnull user;
Swift
var user: RLMSyncUser { get }
-
The URL of the remote Realm upon the Realm Object Server.
Warning
The URL cannot end with.realm
,.realm.lock
or.realm.management
.Declaration
Objective-C
@property (nonatomic, readonly) NSURL *_Nonnull realmURL;
Swift
var realmURL: URL { get }
-
A local path to a file containing the trust anchors for SSL connections.
Only the certificates stored in the PEM file (or any certificates signed by it, if the file contains a CA cert) will be accepted when initiating a connection to a server. This prevents certain certain kinds of man-in-the-middle (MITM) attacks, and can also be used to trust a self-signed certificate which would otherwise be untrusted.
On macOS, the file may be in any of the formats supported by SecItemImport(), including PEM and .cer (see SecExternalFormat for a complete list of possible formats). On iOS and other platforms, only DER .cer files are supported.
Declaration
Objective-C
@property (nonatomic, nullable) NSURL *pinnedCertificateURL;
Swift
var pinnedCertificateURL: URL? { get set }
-
Whether SSL certificate validation is enabled for the connection associated with this configuration value. SSL certificate validation is ON by default.
Warning
NEVER disable certificate validation for clients and servers in production.Declaration
Objective-C
@property (nonatomic) BOOL enableSSLValidation;
Swift
var enableSSLValidation: Bool { get set }
-
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
Objective-C
@property (nonatomic) BOOL fullSynchronization;
Swift
var fullSynchronization: Bool { get set }
-
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
Objective-C
@property (nonatomic, copy, nullable) NSString *urlPrefix;
Swift
var urlPrefix: String? { get set }
-
Whether nonfatal connection errors should cancel async opens.
By default, if a nonfatal connection error such as a connection timing out occurs, any currently pending asyncOpen operations will ignore the error and continue to retry until it succeeds. If this is set to true, the open will instead fail and report the error.
FIXME: This should probably be true by default in the next major version.
Declaration
Objective-C
@property (nonatomic) _Bool cancelAsyncOpenOnNonFatalErrors;
Swift
var cancelAsyncOpenOnNonFatalErrors: Bool { get set }