CCKDatabase
public protocol CCKDatabase
A protocol used to abstract a CKDatabase
.
Invoke the extension methods on your
CKDatabase
instances in order to create Publishers
.
See also
CloudKit
See also
Combine
-
Implemented by
CKDatabase
.See also
delete
Declaration
Swift
func delete( withRecordID recordID: CKRecord.ID, completionHandler: @escaping (CKRecord.ID?, Error?) -> Void)
-
Implemented by
CKDatabase
.See also
delete
Declaration
Swift
func delete( withRecordZoneID zoneID: CKRecordZone.ID, completionHandler: @escaping (CKRecordZone.ID?, Error?) -> Void)
-
Implemented by
CKDatabase
.See also
delete
Declaration
Swift
func delete( withSubscriptionID subscriptionID: CKSubscription.ID, completionHandler: @escaping (String?, Error?) -> Void)
-
Implemented by
CKDatabase
.See also
fetchDeclaration
Swift
func fetch( withRecordID recordID: CKRecord.ID, completionHandler: @escaping (CKRecord?, Error?) -> Void)
-
Implemented by
CKDatabase
.See also
fetchDeclaration
Swift
func fetch( withRecordZoneID zoneID: CKRecordZone.ID, completionHandler: @escaping (CKRecordZone?, Error?) -> Void)
-
Implemented by
CKDatabase
.See also
fetchDeclaration
Swift
func fetch( withSubscriptionID subscriptionID: CKSubscription.ID, completionHandler: @escaping (CKSubscription?, Error?) -> Void)
-
Implemented by
CKDatabase
.See also
fetchAllRecordZonesDeclaration
Swift
func fetchAllRecordZones(completionHandler: @escaping ([CKRecordZone]?, Error?) -> Void)
-
Implemented by
CKDatabase
.See also
fetchAllSubscriptionsDeclaration
Swift
func fetchAllSubscriptions(completionHandler: @escaping ([CKSubscription]?, Error?) -> Void)
-
Implemented by
CKDatabase
.See also
fetchAllSubscriptionsDeclaration
Swift
func perform( _ query: CKQuery, inZoneWith zoneID: CKRecordZone.ID?, completionHandler: @escaping ([CKRecord]?, Error?) -> Void)
-
Implemented by
CKDatabase
.See also
save
Declaration
Swift
func save(_ record: CKRecord, completionHandler: @escaping (CKRecord?, Error?) -> Void)
-
Implemented by
CKDatabase
.See also
save
Declaration
Swift
func save(_ zone: CKRecordZone, completionHandler: @escaping (CKRecordZone?, Error?) -> Void)
-
Implemented by
CKDatabase
.See also
save
Declaration
Swift
func save( _ subscription: CKSubscription, completionHandler: @escaping (CKSubscription?, Error?) -> Void)
-
save(record:
Extension methodwithConfiguration: savePolicy: clientChangeTokenData: ) Saves a single record.
See also
CKModifyRecordsOperation
Declaration
Swift
public func save( record: CKRecord, withConfiguration configuration: CKOperation.Configuration? = nil, savePolicy: CKModifyRecordsOperation.RecordSavePolicy = .ifServerRecordUnchanged, clientChangeTokenData: Data? = nil ) -> AnyPublisher<CKRecord, Error>
Parameters
record
The record to save to the database.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
savePolicy
The policy to apply when the server contains a newer version of a specific record.
clientChangeTokenData
A token that tracks local changes to records.
-
Saves multiple records.
See also
CKModifyRecordsOperation
Declaration
Swift
public func save( records: [CKRecord], atomically isAtomic: Bool = true, withConfiguration configuration: CKOperation.Configuration? = nil, savePolicy: CKModifyRecordsOperation.RecordSavePolicy = .ifServerRecordUnchanged, clientChangeTokenData: Data? = nil ) -> AnyPublisher<CKRecord, Error>
Parameters
records
The records to save to the database.
isAtomic
A Boolean value that indicates whether the entire operation fails when CloudKit can’t save one or more records in a record zone.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
savePolicy
The policy to apply when the server contains a newer version of a specific record.
clientChangeTokenData
A token that tracks local changes to records.
-
saveAtBackgroundPriority(record:
Extension method) Saves a single record.
Note
CombineCloudKit executes the save with a low priority. Use this method when you don’t require the save to happen immediately.See also
save
Declaration
Swift
public func saveAtBackgroundPriority(record: CKRecord) -> AnyPublisher<CKRecord, Error>
Parameters
record
The record to save to the database.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
-
Saves a single record.
See also
CKModifyRecordsOperation
Declaration
Swift
public func saveWithProgress( record: CKRecord, withConfiguration configuration: CKOperation.Configuration? = nil, savePolicy: CKModifyRecordsOperation.RecordSavePolicy = .ifServerRecordUnchanged, clientChangeTokenData: Data? = nil ) -> AnyPublisher<(CKRecord, Progress), Error>
Parameters
record
The record to save to the database.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
savePolicy
The policy to apply when the server contains a newer version of a specific record.
clientChangeTokenData
A token that tracks local changes to records.
-
saveWithProgress(records:
Extension methodatomically: withConfiguration: savePolicy: clientChangeTokenData: ) Saves multiple records.
See also
CKModifyRecordsOperation
Declaration
Swift
public func saveWithProgress( records: [CKRecord], atomically isAtomic: Bool = true, withConfiguration configuration: CKOperation.Configuration? = nil, savePolicy: CKModifyRecordsOperation.RecordSavePolicy = .ifServerRecordUnchanged, clientChangeTokenData: Data? = nil ) -> AnyPublisher<(CKRecord, Progress), Error>
Parameters
records
The records to save to the database.
isAtomic
A Boolean value that indicates whether the entire operation fails when CloudKit can’t save one or more records in a record zone.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
savePolicy
The policy to apply when the server contains a newer version of a specific record.
clientChangeTokenData
A token that tracks local changes to records.
-
delete(recordID:
Extension methodwithConfiguration: ) Deletes a single record.
See also
CKModifyRecordsOperation
Declaration
Swift
public func delete( recordID: CKRecord.ID, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKRecord.ID, Error>
Parameters
recordID
The ID of the record to delete permanently from the database.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisher
that emits the deletedCKRecord.ID
, or an error if CombineCloudKit can’t delete it. -
delete(recordIDs:
Extension methodatomically: withConfiguration: ) Deletes multiple records.
See also
CKModifyRecordsOperation
Declaration
Swift
public func delete( recordIDs: [CKRecord.ID], atomically isAtomic: Bool = true, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKRecord.ID, Error>
Parameters
recordIDs
The IDs of the records to delete permanently from the database.
isAtomic
A Boolean value that indicates whether the entire operation fails when CloudKit can’t delete one or more records in a record zone.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisher
that emits the deletedCKRecord.ID
s, or an error if CombineCloudKit can’t delete them. -
deleteAtBackgroundPriority(recordID:
Extension method) Deletes a single record.
Note
CombineCloudKit executes the delete with a low priority. Use this method when you don’t require the delete to happen immediately.See also
delete
Declaration
Swift
public func deleteAtBackgroundPriority(recordID: CKRecord.ID) -> AnyPublisher<CKRecord.ID, Error>
Parameters
recordID
The ID of the record to delete permanently from the database.
Return Value
A
Publisher
that emits the deletedCKRecord.ID
, or an error if CombineCloudKit can’t delete it. The publisher ignores requests for cooperative cancellation. -
modify(recordsToSave:
Extension methodrecordIDsToDelete: atomically: withConfiguration: savePolicy: clientChangeTokenData: ) Modifies one or more records.
See also
CKModifyRecordsOperation
Declaration
Swift
public func modify( recordsToSave: [CKRecord]? = nil, recordIDsToDelete: [CKRecord.ID]? = nil, atomically isAtomic: Bool = true, withConfiguration configuration: CKOperation.Configuration? = nil, savePolicy: CKModifyRecordsOperation.RecordSavePolicy = .ifServerRecordUnchanged, clientChangeTokenData: Data? = nil ) -> AnyPublisher<(CKRecord?, CKRecord.ID?), Error>
Parameters
recordsToSave
The records to save to the database.
recordsToDelete
The IDs of the records to delete permanently from the database.
isAtomic
A Boolean value that indicates whether the entire operation fails when CloudKit can’t update one or more records in a record zone.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
savePolicy
The policy to apply when the server contains a newer version of a specific record.
clientChangeTokenData
A token that tracks local changes to records.
Return Value
A
Publisher
that emits the savedCKRecord
s and the deletedCKRecord.ID
s. -
modifyWithProgress(recordsToSave:
Extension methodrecordIDsToDelete: atomically: withConfiguration: savePolicy: clientChangeTokenData: ) Modifies one or more records.
See also
CKModifyRecordsOperation
Declaration
Swift
public func modifyWithProgress( recordsToSave: [CKRecord]? = nil, recordIDsToDelete: [CKRecord.ID]? = nil, atomically isAtomic: Bool = true, withConfiguration configuration: CKOperation.Configuration? = nil, savePolicy: CKModifyRecordsOperation.RecordSavePolicy = .ifServerRecordUnchanged, clientChangeTokenData: Data? = nil ) -> AnyPublisher<((CKRecord, Progress)?, CKRecord.ID?), Error>
Parameters
recordsToSave
The records to save to the database.
recordsToDelete
The IDs of the records to delete permanently from the database.
isAtomic
A Boolean value that indicates whether the entire operation fails when CloudKit can’t update one or more records in a record zone.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
savePolicy
The policy to apply when the server contains a newer version of a specific record.
clientChangeTokenData
A token that tracks local changes to records.
Return Value
A
Publisher
that emits theProgress
of the savedCKRecord
s, and the deletedCKRecord.ID
s. -
fetch(recordID:
Extension methoddesiredKeys: withConfiguration: ) Fetches the record with the specified ID.
See also
CKFetchRecordsOperationDeclaration
Swift
public func fetch( recordID: CKRecord.ID, desiredKeys: [CKRecord.FieldKey]? = nil, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKRecord, Error>
Parameters
recordID
The record ID of the record to fetch.
desiredKeys
The fields of the record to fetch. Use this parameter to limit the amount of data that CloudKit returns for the record. When CloudKit returns the record, it only includes fields with names that match one of the keys in this parameter. The parameter’s default value is
nil
, which instructs CloudKit to return all of the record’s keys.configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
-
fetch(recordIDs:
Extension methoddesiredKeys: withConfiguration: ) Fetches multiple records.
See also
CKFetchRecordsOperationDeclaration
Swift
public func fetch( recordIDs: [CKRecord.ID], desiredKeys: [CKRecord.FieldKey]? = nil, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKRecord, Error>
Parameters
recordIDs
The record IDs of the records to fetch.
desiredKeys
The fields of the records to fetch. Use this parameter to limit the amount of data that CloudKit returns for each record. When CloudKit returns a record, it only includes fields with names that match one of the keys in this parameter. The parameter’s default value is
nil
, which instructs CloudKit to return all of a record’s keys.configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
-
fetchAtBackgroundPriority(withRecordID:
Extension method) Fetches the record with the specified ID.
Note
CombineCloudKit executes the fetch with a low priority. Use this method when you don’t require the record immediately.See also
fetchDeclaration
Swift
public func fetchAtBackgroundPriority( withRecordID recordID: CKRecord.ID ) -> AnyPublisher<CKRecord, Error>
Parameters
recordID
The record ID of the record to fetch.
-
fetchWithProgress(recordID:
Extension methoddesiredKeys: withConfiguration: ) Fetches the record with the specified ID.
See also
CKFetchRecordsOperationDeclaration
Swift
public func fetchWithProgress( recordID: CKRecord.ID, desiredKeys: [CKRecord.FieldKey]? = nil, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<((CKRecord.ID, Progress)?, CKRecord?), Error>
Parameters
recordID
The record ID of the record to fetch.
desiredKeys
The fields of the record to fetch. Use this parameter to limit the amount of data that CloudKit returns for the record. When CloudKit returns the record, it only includes fields with names that match one of the keys in this parameter. The parameter’s default value is
nil
, which instructs CloudKit to return all of the record’s keys.configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
-
fetchWithProgress(recordIDs:
Extension methoddesiredKeys: withConfiguration: ) Fetches multiple records.
See also
CKFetchRecordsOperationDeclaration
Swift
public func fetchWithProgress( recordIDs: [CKRecord.ID], desiredKeys: [CKRecord.FieldKey]? = nil, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<((CKRecord.ID, Progress)?, CKRecord?), Error>
Parameters
recordIDs
The record IDs of the records to fetch.
desiredKeys
The fields of the records to fetch. Use this parameter to limit the amount of data that CloudKit returns for each record. When CloudKit returns a record, it only includes fields with names that match one of the keys in this parameter. The parameter’s default value is
nil
, which instructs CloudKit to return all of a record’s keys.configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisher
that emits theProgress
of the fetchedCKRecord.ID
s and the fetchedCKRecord
s, or an error if CombineCloudKit can’t fetch them. -
fetchCurrentUserRecord(desiredKeys:
Extension methodwithConfiguration: ) Fetches the current user record.
See also
fetchCurrentUserRecordOperationDeclaration
Swift
public func fetchCurrentUserRecord( desiredKeys _: [CKRecord.FieldKey]? = nil, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKRecord, Error>
Parameters
desiredKeys
The fields of the record to fetch. Use this parameter to limit the amount of data that CloudKit returns for the record. When CloudKit returns the record, it only includes fields with names that match one of the keys in this parameter. The parameter’s default value is
nil
, which instructs CloudKit to return all of the record’s keys.configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
-
Fetches records that match the specified query.
See also
CKQuerySee also
CKQueryOperationSee also
NSPredicateSee also
NSSortDescriptorDeclaration
Swift
public func performQuery( ofType recordType: CKRecord.RecordType, where predicate: NSPredicate = NSPredicate(value: true), orderBy sortDescriptors: [NSSortDescriptor]? = nil, inZoneWith zoneID: CKRecordZone.ID? = nil, desiredKeys: [CKRecord.FieldKey]? = nil, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKRecord, Error>
Parameters
recordType
The record type to search.
predicate
The predicate to use for matching records.
sortDescriptors
The sort descriptors for organizing the query’s results.
zoneID
The ID of the record zone that contains the records to search. The value of this parameter limits the scope of the search to only the records in the specified record zone. If you don’t specify a record zone, the search includes all record zones.
desiredKeys
The fields of the records to fetch. Use this parameter to limit the amount of data that CloudKit returns for each record. When CloudKit returns a record, it only includes fields with names that match one of the keys in this parameter. The parameter’s default value is
nil
, which instructs CloudKit to return all of a record’s keys.configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
-
perform(_:
Extension methodinZoneWith: desiredKeys: withConfiguration: ) Fetches records that match the specified query.
See also
CKQuerySee also
CKQueryOperationSee also
NSPredicateSee also
NSSortDescriptorDeclaration
Swift
public func perform( _ query: CKQuery, inZoneWith zoneID: CKRecordZone.ID? = nil, desiredKeys: [CKRecord.FieldKey]? = nil, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKRecord, Error>
Parameters
query
The query for the search.
zoneID
The ID of the record zone that contains the records to search. The value of this parameter limits the scope of the search to only the records in the specified record zone. If you don’t specify a record zone, the search includes all record zones.
desiredKeys
The fields of the records to fetch. Use this parameter to limit the amount of data that CloudKit returns for each record. When CloudKit returns a record, it only includes fields with names that match one of the keys in this parameter. The parameter’s default value is
nil
, which instructs CloudKit to return all of a record’s keys.configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
-
saveAtBackgroundPriority(recordZone:
Extension method) Saves a single record zone.
Note
CombineCloudKit executes the save with a low priority. Use this method when you don’t require the save to happen immediately.See also
save
Declaration
Swift
public func saveAtBackgroundPriority( recordZone: CKRecordZone ) -> AnyPublisher<CKRecordZone, Error>
Parameters
recordZone
The record zone to save.
Return Value
A
Publisher
that emits the savedCKRecordZone
, or an error if CombineCloudKit can’t save it. The publisher ignores requests for cooperative cancellation. -
save(recordZone:
Extension methodwithConfiguration: ) Saves a single record zone.
See also
CKModifyRecordZonesOperation
Declaration
Swift
public func save( recordZone: CKRecordZone, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKRecordZone, Error>
Parameters
recordZone
The record zone to save.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisher
that emits the savedCKRecordZone
, or an error if CombineCloudKit can’t save it. -
save(recordZones:
Extension methodwithConfiguration: ) Saves multiple record zones.
See also
CKModifyRecordZonesOperation
Declaration
Swift
public func save( recordZones: [CKRecordZone], withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKRecordZone, Error>
Parameters
recordZones
The record zones to save.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisher
that emits the savedCKRecordZone
s, or an error if CombineCloudKit can’t save them. -
deleteAtBackgroundPriority(recordZoneID:
Extension method) Deletes a single record zone.
Note
CombineCloudKit executes the delete with a low priority. Use this method when you don’t require the delete to happen immediately.See also
delete
Declaration
Swift
public func deleteAtBackgroundPriority( recordZoneID: CKRecordZone.ID ) -> AnyPublisher<CKRecordZone.ID, Error>
Parameters
recordZoneID
The ID of the record zone to delete.
Return Value
A
Publisher
that emits the deletedCKRecordZone.ID
, or an error if CombineCloudKit can’t delete it. The publisher ignores requests for cooperative cancellation. -
delete(recordZoneID:
Extension methodwithConfiguration: ) Deletes a single record zone.
See also
CKModifyRecordZonesOperation
Declaration
Swift
public func delete( recordZoneID: CKRecordZone.ID, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKRecordZone.ID, Error>
Parameters
recordZoneID
The ID of the record zone to delete.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisher
that emits the deletedCKRecordZone.ID
, or an error if CombineCloudKit can’t delete it. -
delete(recordZoneIDs:
Extension methodwithConfiguration: ) Deletes multiple record zones.
See also
CKModifyRecordZonesOperation
Declaration
Swift
public func delete( recordZoneIDs: [CKRecordZone.ID], withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKRecordZone.ID, Error>
Parameters
recordZoneIDs
The IDs of the record zones to delete.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisher
that emits the deletedCKRecordZone.ID
s, or an error if CombineCloudKit can’t delete them. -
modify(recordZonesToSave:
Extension methodrecordZoneIDsToDelete: withConfiguration: ) Modifies one or more record zones.
See also
CKModifyRecordZonesOperation
Declaration
Swift
public func modify( recordZonesToSave: [CKRecordZone]? = nil, recordZoneIDsToDelete: [CKRecordZone.ID]? = nil, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<(CKRecordZone?, CKRecordZone.ID?), Error>
Parameters
recordZonesToSave
The record zones to save.
recordZonesToDelete
The IDs of the record zones to delete.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisher
that emits the savedCKRecordZone
s and the deletedCKRecordZone.ID
s, or an error if CombineCloudKit can’t modify them. -
fetchAtBackgroundPriority(withRecordZoneID:
Extension method) Fetches the record zone with the specified ID.
Note
CombineCloudKit executes the fetch with a low priority. Use this method when you don’t require the record zone immediately.See also
fetchDeclaration
Swift
public func fetchAtBackgroundPriority( withRecordZoneID recordZoneID: CKRecordZone.ID ) -> AnyPublisher<CKRecordZone, Error>
Parameters
recordZoneID
The ID of the record zone to fetch.
Return Value
A
Publisher
that emits theCKRecordZone
, or an error if CombineCloudKit can’t fetch it. The publisher ignores requests for cooperative cancellation. -
fetch(recordZoneID:
Extension methodwithConfiguration: ) Fetches the record zone with the specified ID.
See also
CKFetchRecordZonesOperationDeclaration
Swift
public func fetch( recordZoneID: CKRecordZone.ID, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKRecordZone, Error>
Parameters
recordZoneID
The ID of the record zone to fetch.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisher
that emits theCKRecordZone
, or an error if CombineCloudKit can’t fetch it. -
fetch(recordZoneIDs:
Extension methodwithConfiguration: ) Fetches multiple record zones.
See also
CKFetchRecordZonesOperationDeclaration
Swift
public func fetch( recordZoneIDs: [CKRecordZone.ID], withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKRecordZone, Error>
Parameters
recordZoneIDs
The IDs of the record zones to fetch.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisher
that emits theCKRecordZone
s, or an error if CombineCloudKit can’t fetch them. -
fetchAllRecordZonesAtBackgroundPriority()
Extension methodFetches the database’s record zones.
Note
CombineCloudKit executes the fetch with a low priority. Use this method when you don’t require the record zones immediately.See also
fetchAllRecordZonesDeclaration
Swift
public func fetchAllRecordZonesAtBackgroundPriority() -> AnyPublisher<CKRecordZone, Error>
Return Value
A
Publisher
that emits theCKRecordZone
s, or an error if CombineCloudKit can’t fetch them. -
fetchAllRecordZones(withConfiguration:
Extension method) Fetches the database’s record zones.
See also
fetchAllRecordZonesOperationDeclaration
Swift
public func fetchAllRecordZones( withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKRecordZone, Error>
Parameters
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisher
that emits theCKRecordZone
s, or an error if CombineCloudKit can’t fetch them. -
saveAtBackgroundPriority(subscription:
Extension method) Saves a single subscription.
Note
CombineCloudKit executes the save with a low priority. Use this method when you don’t require the save to happen immediately.See also
save
Declaration
Swift
public func saveAtBackgroundPriority( subscription: CKSubscription ) -> AnyPublisher<CKSubscription, Error>
Parameters
subscription
The subscription to save.
Return Value
A
Publisher
that emits the savedCKSubscription
, or an error if CombineCloudKit can’t save it. The publisher ignores requests for cooperative cancellation. -
save(subscription:
Extension methodwithConfiguration: ) Saves a single subscription.
See also
CKModifySubscriptionsOperation
Declaration
Swift
public func save( subscription: CKSubscription, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKSubscription, Error>
Parameters
subscription
The subscription to save.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisher
that emits the savedCKSubscription
, or an error if CombineCloudKit can’t save it. -
save(subscriptions:
Extension methodwithConfiguration: ) Saves multiple subscriptions.
See also
CKModifySubscriptionsOperation
Declaration
Swift
public func save( subscriptions: [CKSubscription], withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKSubscription, Error>
Parameters
subscriptions
The subscriptions to save.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisher
that emits the savedCKSubscription
s, or an error if CombineCloudKit can’t save them. -
deleteAtBackgroundPriority(subscriptionID:
Extension method) Deletes a single subscription.
Note
CombineCloudKit executes the delete with a low priority. Use this method when you don’t require the delete to happen immediately.See also
delete
Declaration
Swift
public func deleteAtBackgroundPriority( subscriptionID: CKSubscription.ID ) -> AnyPublisher<CKSubscription.ID, Error>
Parameters
subscriptionID
The ID of the subscription to delete.
Return Value
A
Publisher
that emits the deletedCKSubscription.ID
, or an error if CombineCloudKit can’t delete it. -
delete(subscriptionID:
Extension methodwithConfiguration: ) Deletes a single subscription.
See also
CKModifySubscriptionsOperation
Declaration
Swift
public func delete( subscriptionID: CKSubscription.ID, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKSubscription.ID, Error>
Parameters
subscriptionID
The ID of the subscription to delete.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisher
that emits the deletedCKSubscription.ID
, or an error if CombineCloudKit can’t delete it. -
delete(subscriptionIDs:
Extension methodwithConfiguration: ) Deletes multiple subscriptions.
See also
CKModifySubscriptionsOperation
Declaration
Swift
public func delete( subscriptionIDs: [CKSubscription.ID], withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKSubscription.ID, Error>
Parameters
subscriptionIDs
The IDs of the subscriptions to delete.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisher
that emits the deletedCKSubscription.ID
s, or an error if CombineCloudKit can’t delete them. -
Modifies one or more subscriptions.
See also
CKModifySubscriptionsOperation
Declaration
Swift
public func modify( subscriptionsToSave: [CKSubscription]? = nil, subscriptionIDsToDelete: [CKSubscription.ID]? = nil, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<(CKSubscription?, CKSubscription.ID?), Error>
Parameters
subscriptionsToSave
The subscriptions to save.
subscriptionsToDelete
The IDs of the subscriptions to delete.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisher
that emits the savedCKSubscription
s and the deletedCKSubscription.ID
s, or an error if CombineCloudKit can’t modify them. -
fetchAtBackgroundPriority(withSubscriptionID:
Extension method) Fetches the subscription with the specified ID.
Note
CombineCloudKit executes the fetch with a low priority. Use this method when you don’t require the subscription immediately.See also
fetchDeclaration
Swift
public func fetchAtBackgroundPriority( withSubscriptionID subscriptionID: CKSubscription.ID ) -> AnyPublisher<CKSubscription, Error>
Parameters
subscriptionID
The ID of the subscription to fetch.
Return Value
A
Publisher
that emits theCKSubscription
, or an error if CombineCloudKit can’t fetch it. The publisher ignores requests for cooperative cancellation. -
fetch(subscriptionID:
Extension methodwithConfiguration: ) Fetches the subscription with the specified ID.
See also
CKFetchSubscriptionsOperationDeclaration
Swift
public func fetch( subscriptionID: CKSubscription.ID, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKSubscription, Error>
Parameters
subscriptionID
The ID of the subscription to fetch.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisher
that emits theCKSubscription
, or an error if CombineCloudKit can’t fetch it. -
fetch(subscriptionIDs:
Extension methodwithConfiguration: ) Fetches multiple subscriptions.
See also
CKFetchSubscriptionsOperationDeclaration
Swift
public func fetch( subscriptionIDs: [CKSubscription.ID], withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKSubscription, Error>
Parameters
subscriptionIDs
The IDs of the subscriptions to fetch.
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisher
that emits theCKSubscription
s, or an error if CombineCloudKit can’t fetch them. -
fetchAllSubscriptionsAtBackgroundPriority()
Extension methodFetches the database’s subscriptions.
Note
CombineCloudKit executes the fetch with a low priority. Use this method when you don’t require the subscriptions immediately.See also
fetchAllSubscriptionsDeclaration
Swift
public func fetchAllSubscriptionsAtBackgroundPriority() -> AnyPublisher<CKSubscription, Error>
Return Value
A
Publisher
that emits theCKSubscription
s, or an error if CombineCloudKit can’t fetch them. The publisher ignores requests for cooperative cancellation. -
fetchAllSubscriptions(withConfiguration:
Extension method) Fetches the database’s subscriptions.
See also
fetchAllSubscriptionsOperationDeclaration
Swift
public func fetchAllSubscriptions( withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKSubscription, Error>
Parameters
configuration
The configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisher
that emits theCKSubscription
s, or an error if CombineCloudKit can’t fetch them.