RLMSyncManager

@interface RLMSyncManager : NSObject

A singleton manager which serves as a central point for sync-related configuration.

  • An optional block which can be used to report sync-related errors to your application. Errors reported through this mechanism are always fatal; they represent attempts to open sessions which are invalid (for example, using malformed URLs).

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable)
        RLMSyncErrorReportingBlock errorHandler;

    Swift

    var errorHandler: RLMSyncErrorReportingBlock? { get set }
  • A reverse-DNS string uniquely identifying this application. In most cases this is automatically set by the SDK, and does not have to be explicitly configured.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSString *_Nonnull appID;

    Swift

    var appID: String { get set }
  • Whether SSL certificate validation should be disabled. SSL certificate validation is ON by default. Setting this property after at least one synced Realm or standalone Session has been opened is a no-op.

    Warning

    NEVER disable certificate validation for clients and servers in production.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL disableSSLValidation;

    Swift

    var disableSSLValidation: Bool { get set }
  • The logging threshold which newly opened synced Realms will use. Defaults to RLMSyncLogLevelInfo. Set this before any synced Realms are opened. Logging strings are output to ASL.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) RLMSyncLogLevel logLevel;

    Swift

    var logLevel: RLMSyncLogLevel { get set }
  • The sole instance of the singleton.

    Declaration

    Objective-C

    + (nonnull instancetype)sharedManager;

    Swift

    class func __shared() -> Self