CBLReplicatorConfiguration

@interface CBLReplicatorConfiguration : NSObject <NSCopying>

Replicator configuration.

  • The local database to replicate with the target database.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) CBLDatabase *database;
  • The replication target to replicate with. The replication target can be either a URL to the remote database or a local databaes.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) id target;
  • Replication type indicating the direction of the replication. The default value is .pushAndPull which is bidrectional.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CBLReplicatorType replicatorType;
  • Should the replicator stay active indefinitely, and push/pull changed documents?. The default value is NO.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL continuous;
  • The conflict resolver for this replicator. The default value is nil, which means the local database’s conflict resolver will be used.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic, nullable) id<CBLConflictResolver>
        conflictResolver;
  • An Authenticator to authenticate with a remote server. Currently there are two types of the authenticators, CBLBasicAuthenticator and CBLSessionAuthenticator, supported.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic, nullable)
        CBLAuthenticator *authenticator;
  • If this property is non-null, the server is required to have this exact SSL/TLS certificate, or the connection will fail.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic, nullable)
        SecCertificateRef pinnedServerCertificate;
  • Extra HTTP headers to send in all requests to the remote target.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic, nullable)
        NSDictionary<NSString *, NSString *> *headers;
  • A set of Sync Gateway channel names to pull from. Ignored for push replication. The default value is nil, meaning that all accessible channels will be pulled. Note: channels that are not accessible to the user will be ignored by Sync Gateway.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic, nullable) NSArray<NSString *> *channels;
  • A set of document IDs to filter by: if not nil, only documents with these IDs will be pushed and/or pulled.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic, nullable)
        NSArray<NSString *> *documentIDs;
  • Creates a CBLReplicatorConfiguration with the given local database and remote database URL.

    Declaration

    Objective-C

    + (nonnull instancetype)withDatabase:(nonnull CBLDatabase *)database
                               targetURL:(nonnull NSURL *)targetURL;
  • Creates a CBLReplicatorConfiguration with the given local database and another local database.

    Declaration

    Objective-C

    + (nonnull instancetype)withDatabase:(nonnull CBLDatabase *)database
                          targetDatabase:(nonnull CBLDatabase *)targetDatabase;
  • Initializes a CBLReplicatorConfiguration with the given local database and remote database URL.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDatabase:(nonnull CBLDatabase *)database
                                   targetURL:(nonnull NSURL *)targetURL;
  • Initializes a CBLReplicatorConfiguration with the given local database and another local database.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDatabase:(nonnull CBLDatabase *)database
                              targetDatabase:(nonnull CBLDatabase *)targetDatabase;