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
collectionThe collection.
-
Creates an array of
MultipeerCollectionConfigurationobjects from the given collections.Each collection is wrapped in a
MultipeerCollectionConfigurationusing 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
MultipeerCollectionConfigurationobjects directly instead.Declaration
Swift
public static func fromCollections(_ collections: [Collection]) -> [MultipeerCollectionConfiguration]Parameters
collectionsAn array of
Collectionobjects to configure for replication.Return Value
An array of
MultipeerCollectionConfigurationobjects corresponding to the given collections.
MultipeerCollectionConfiguration Structure Reference