RLMSyncConfiguration
Objective-C
@interface RLMSyncConfiguration : NSObject
迅速
@_nonSendable(_assumed) class RLMSyncConfiguration : NSObject
表示Realm配置状态的配置对象,旨在与Realm对象MongoDB Server同步。
-
远程 Realm 所属的用户。
-
一个枚举,用于确定客户端重置时的文件恢复行为。 @note:默认为
RLMClientResetModeRecoverUnsyncedChanges
@see:
RLMClientResetMode
@see: https://mongodb.com/zh-cn/docs/realm/sync/error-handling/client-resets/声明
Objective-C
@property (nonatomic) RLMClientResetMode clientResetMode;
迅速
var clientResetMode: RLMClientResetMode { get set }
-
在客户端重置发生之前进行通知的回调。 @see:
RLMClientResetBeforeBlock
声明
Objective-C
@property (nonatomic, nullable) RLMClientResetBeforeBlock beforeClientReset;
迅速
var beforeClientReset: RLMClientResetBeforeBlock? { get set }
-
在客户端重置发生后发出通知的回调。 @see:
RLMClientResetAfterBlock
声明
Objective-C
@property (nonatomic, nullable) RLMClientResetAfterBlock afterClientReset;
迅速
var afterClientReset: RLMClientResetAfterBlock? { get set }
-
遇到
RLMSyncErrorClientResetError
时执行的回调。有关手动处理客户端重置的更多详细信息,请参阅@See RLMSyncErrorReportingBlock 和 RLMSyncErrorClientResetError。声明
Objective-C
@property (nonatomic, nullable) RLMSyncErrorReportingBlock manualClientResetHandler;
迅速
var manualClientResetHandler: RLMSyncErrorReportingBlock? { get set }
-
一种配置,用于控制打开 Realm 时如何填充初始订阅。
声明
Objective-C
@property (nonatomic, nullable) RLMInitialSubscriptionsConfiguration *initialSubscriptions;
迅速
var initialSubscriptions: RLMInitialSubscriptionsConfiguration? { get set }
-
非致命连接错误是否应取消异步打开。
默认情况下,如果发生非致命连接错误(例如连接超时),则任何当前待处理的 asyncOpen 操作都将忽略该错误并继续重试,直到成功为止。如果将其设置为 true,则打开操作将失败并报告错误。
NEXT-MAJOR:默认为 true。
声明
Objective-C
@property (nonatomic) _Bool cancelAsyncOpenOnNonFatalErrors;
迅速
var cancelAsyncOpenOnNonFatalErrors: Bool { get set }