MultipeerCollectionConfiguration
public struct MultipeerCollectionConfiguration : CBLConvertible
Configuration for specifying a collection to replicate, including optional filters and a custom conflict resolver.
-
The collection.
Declaration
Swift
public let collection: Collection
-
Optional list of document IDs to replicate. Only documents with the specified IDs will be replicated.
Declaration
Swift
public var documentIDs: Array<String>?
-
Optional push filter function.
Declaration
Swift
public var pushFilter: MultipeerReplicationFilter?
-
Optional pull filter function.
Declaration
Swift
public var pullFilter: MultipeerReplicationFilter?
-
Optional Custom conflict resolver. If not specified, the default conflict resolver will be used.
Declaration
Swift
public var conflictResolver: MultipeerConflictResolver?
-
Initializes the configuration with the specified collection.
Declaration
Swift
public init(collection: Collection)
Parameters
collection
The collection.
-
Creates an array of
MultipeerCollectionConfiguration
objects from the given collections.Each collection is wrapped in a
MultipeerCollectionConfiguration
using default settings (no filters and no custom conflict resolvers).This is a convenience method for configuring multiple collections with default configurations. If custom configurations are needed, construct
MultipeerCollectionConfiguration
objects directly instead.Declaration
Swift
public static func fromCollections(_ collections: [Collection]) -> [MultipeerCollectionConfiguration]
Parameters
collections
An array of
Collection
objects to configure for replication.Return Value
An array of
MultipeerCollectionConfiguration
objects corresponding to the given collections.