RLMSyncConfiguration
Objective-C
@interface RLMSyncConfiguration : NSObject
Swift
@_nonSendable(_assumed) class RLMSyncConfiguration : NSObject
A configuration object representing configuration state for a Realm which is intended to sync with a Realm Object Server.
-
The value this Realm is partitioned on. The partition key is a property defined in Atlas App Services. All classes with a property with this value will be synchronized to the Realm.
-
An enum which determines file recovery behavior in the event of a client reset. @note: Defaults to
RLMClientResetModeRecoverUnsyncedChanges
@see:
RLMClientResetMode
@see: https://mongodb.prakticum-team.ru/proxy/docs.mongodb.com/realm/sync/error-handling/client-resets/Declaration
Objective-C
@property (nonatomic) RLMClientResetMode clientResetMode;
Swift
var clientResetMode: RLMClientResetMode { get set }
-
A callback which notifies prior to prior to a client reset occurring. @see:
RLMClientResetBeforeBlock
Declaration
Objective-C
@property (nonatomic, nullable) RLMClientResetBeforeBlock beforeClientReset;
Swift
var beforeClientReset: RLMClientResetBeforeBlock? { get set }
-
A callback which notifies after a client reset has occurred. @see:
RLMClientResetAfterBlock
Declaration
Objective-C
@property (nonatomic, nullable) RLMClientResetAfterBlock afterClientReset;
Swift
var afterClientReset: RLMClientResetAfterBlock? { get set }
-
A callback that’s executed when an
RLMSyncErrorClientResetError
is encountered. @See RLMSyncErrorReportingBlock and RLMSyncErrorClientResetError for more details on handling a client reset manually.Declaration
Objective-C
@property (nonatomic, nullable) RLMSyncErrorReportingBlock manualClientResetHandler;
Swift
var manualClientResetHandler: RLMSyncErrorReportingBlock? { get set }
-
A configuration that controls how initial subscriptions are populated when the Realm is opened.
Declaration
Objective-C
@property (nonatomic, nullable) RLMInitialSubscriptionsConfiguration *initialSubscriptions;
Swift
var initialSubscriptions: RLMInitialSubscriptionsConfiguration? { 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.
NEXT-MAJOR: This should be true by default.
Declaration
Objective-C
@property (nonatomic) _Bool cancelAsyncOpenOnNonFatalErrors;
Swift
var cancelAsyncOpenOnNonFatalErrors: Bool { get set }