Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Objective-C/CBLReplicatorConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,13 @@ __deprecated_msg(" Use [... initWithTarget:] and [config addCollection: config:]
Initializes a CBLReplicatorConfiguration with the local database and
the target endpoint.

When using this initializer, the default collection of the provided
database is automatically included in the configuration.

If you do not intend to replicate the default collection, use
initWithTarget: instead, and explicitly add the intended collections
to avoid unintended behavior.

@param database The database.
@param target The target endpoint.
@return The CBLReplicatorConfiguration object.
Expand Down
9 changes: 8 additions & 1 deletion Swift/ReplicatorConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,13 @@ public struct ReplicatorConfiguration {
/// Initializes a ReplicatorConfiguration's builder with the given
/// local database and the replication target.
///
/// When using this initializer, the default collection of the provided
/// database is automatically included in the configuration.
///
/// If you do not intend to replicate the default collection, use
/// `init(target:)` instead and explicitly add the intended collections
/// to avoid unintended behavior.
///
/// - Parameters:
/// - database: The local database.
/// - target: The replication target.
Expand All @@ -312,7 +319,7 @@ public struct ReplicatorConfiguration {
/// configuration is specified, a default empty configuration will be applied.
@discardableResult
public mutating func addCollection(_ collection: Collection,
config: CollectionConfiguration? = nil) -> ReplicatorConfiguration {
config: CollectionConfiguration? = nil) -> ReplicatorConfiguration {

if !collection.impl.isValid {
fatalError("Attempt to add an invalid collection.")
Expand Down
Loading