RLMSyncManager
Objective-C
@interface RLMSyncManager : NSObject
Swift
@_nonSendable(_assumed) class RLMSyncManager : NSObject, @unchecked Sendable
A manager which serves as a central point for sync-related configuration.
-
A block which can optionally be set to report sync-related errors to your application.
Any error reported through this block will be of the
RLMSyncError
type, and marked with theRLMSyncErrorDomain
domain.Errors reported through this mechanism are fatal, with several exceptions. Please consult
RLMSyncError
for information about the types of errors that can be reported through the block, and for for suggestions on handling recoverable error codes.See
RLMSyncError
Declaration
Objective-C
@property (copy, nullable) RLMSyncErrorReportingBlock errorHandler;
Swift
var errorHandler: RLMSyncErrorReportingBlock? { get set }
-
A string identifying this application which is included in the User-Agent header of sync connections. By default, this will be the application’s bundle identifier.
This property must be set prior to opening a synchronized Realm for the first time. Any modifications made after opening a Realm will be ignored.
Declaration
Objective-C
@property (copy) NSString *_Nonnull userAgent;
Swift
var userAgent: String { get set }
-
Deprecated
Use
RLMLogger.default.level
/Logger.shared.level
to set/get the default logger threshold level.The logging threshold which newly opened synced Realms will use. Defaults to
RLMSyncLogLevelInfo
.By default logging strings are output to Apple System Logger. Set
logger
to perform custom logging logic instead.Warning
This property must be set before any synced Realms are opened. Setting it after opening any synced Realm will do nothing.Declaration
Objective-C
@property RLMSyncLogLevel logLevel;
Swift
var logLevel: RLMSyncLogLevel { get set }
-
Deprecated
Use
RLMLogger.default
/Logger.shared
to set/get the default logger.The function which will be invoked whenever the sync client has a log message.
If nil, log strings are output to Apple System Logger instead.
Warning
This property must be set before any synced Realms are opened. Setting it after opening any synced Realm will do nothing.Declaration
Objective-C
@property (nullable) RLMSyncLogFunction logger;
Swift
var logger: RLMSyncLogFunction? { get set }
-
The name of the HTTP header to send authorization data in when making requests to Atlas App Services which has been configured to expect a custom authorization header.
Declaration
Objective-C
@property (copy, nullable) NSString *authorizationHeaderName;
Swift
var authorizationHeaderName: String? { get set }
-
Extra HTTP headers to append to every request to Atlas App Services.
Modifying this property while sync sessions are active will result in all sessions disconnecting and reconnecting using the new headers.
Declaration
Objective-C
@property (copy, nullable) NSDictionary<NSString *, NSString *> *customRequestHeaders;
Swift
var customRequestHeaders: [String : String]? { get set }
-
Options for the assorted types of connection timeouts for sync connections.
If nil default values for all timeouts are used instead.
Warning
This property must be set before any synced Realms are opened. Setting it after opening any synced Realm will do nothing.Declaration
Objective-C
@property (copy, nullable) RLMSyncTimeoutOptions *timeoutOptions;
Swift
@NSCopying var timeoutOptions: RLMSyncTimeoutOptions? { get set }