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
deleteDeclaration
Swift
func delete( withRecordID recordID: CKRecord.ID, completionHandler: @escaping (CKRecord.ID?, Error?) -> Void) -
Implemented by
CKDatabase.See also
deleteDeclaration
Swift
func delete( withRecordZoneID zoneID: CKRecordZone.ID, completionHandler: @escaping (CKRecordZone.ID?, Error?) -> Void) -
Implemented by
CKDatabase.See also
deleteDeclaration
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
saveDeclaration
Swift
func save(_ record: CKRecord, completionHandler: @escaping (CKRecord?, Error?) -> Void) -
Implemented by
CKDatabase.See also
saveDeclaration
Swift
func save(_ zone: CKRecordZone, completionHandler: @escaping (CKRecordZone?, Error?) -> Void) -
Implemented by
CKDatabase.See also
saveDeclaration
Swift
func save( _ subscription: CKSubscription, completionHandler: @escaping (CKSubscription?, Error?) -> Void) -
save(record:Extension methodwithConfiguration: savePolicy: clientChangeTokenData: ) Saves a single record.
See also
CKModifyRecordsOperationDeclaration
Swift
public func save( record: CKRecord, withConfiguration configuration: CKOperation.Configuration? = nil, savePolicy: CKModifyRecordsOperation.RecordSavePolicy = .ifServerRecordUnchanged, clientChangeTokenData: Data? = nil ) -> AnyPublisher<CKRecord, Error>Parameters
recordThe record to save to the database.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
savePolicyThe policy to apply when the server contains a newer version of a specific record.
clientChangeTokenDataA token that tracks local changes to records.
-
Saves multiple records.
See also
CKModifyRecordsOperationDeclaration
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
recordsThe records to save to the database.
isAtomicA Boolean value that indicates whether the entire operation fails when CloudKit can’t save one or more records in a record zone.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
savePolicyThe policy to apply when the server contains a newer version of a specific record.
clientChangeTokenDataA 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
saveDeclaration
Swift
public func saveAtBackgroundPriority(record: CKRecord) -> AnyPublisher<CKRecord, Error>Parameters
recordThe record to save to the database.
configurationThe 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
CKModifyRecordsOperationDeclaration
Swift
public func saveWithProgress( record: CKRecord, withConfiguration configuration: CKOperation.Configuration? = nil, savePolicy: CKModifyRecordsOperation.RecordSavePolicy = .ifServerRecordUnchanged, clientChangeTokenData: Data? = nil ) -> AnyPublisher<(CKRecord, Progress), Error>Parameters
recordThe record to save to the database.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
savePolicyThe policy to apply when the server contains a newer version of a specific record.
clientChangeTokenDataA token that tracks local changes to records.
-
saveWithProgress(records:Extension methodatomically: withConfiguration: savePolicy: clientChangeTokenData: ) Saves multiple records.
See also
CKModifyRecordsOperationDeclaration
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
recordsThe records to save to the database.
isAtomicA Boolean value that indicates whether the entire operation fails when CloudKit can’t save one or more records in a record zone.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
savePolicyThe policy to apply when the server contains a newer version of a specific record.
clientChangeTokenDataA token that tracks local changes to records.
-
delete(recordID:Extension methodwithConfiguration: ) Deletes a single record.
See also
CKModifyRecordsOperationDeclaration
Swift
public func delete( recordID: CKRecord.ID, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKRecord.ID, Error>Parameters
recordIDThe ID of the record to delete permanently from the database.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisherthat emits the deletedCKRecord.ID, or an error if CombineCloudKit can’t delete it. -
delete(recordIDs:Extension methodatomically: withConfiguration: ) Deletes multiple records.
See also
CKModifyRecordsOperationDeclaration
Swift
public func delete( recordIDs: [CKRecord.ID], atomically isAtomic: Bool = true, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKRecord.ID, Error>Parameters
recordIDsThe IDs of the records to delete permanently from the database.
isAtomicA Boolean value that indicates whether the entire operation fails when CloudKit can’t delete one or more records in a record zone.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisherthat emits the deletedCKRecord.IDs, 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
deleteDeclaration
Swift
public func deleteAtBackgroundPriority(recordID: CKRecord.ID) -> AnyPublisher<CKRecord.ID, Error>Parameters
recordIDThe ID of the record to delete permanently from the database.
Return Value
A
Publisherthat 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
CKModifyRecordsOperationDeclaration
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
recordsToSaveThe records to save to the database.
recordsToDeleteThe IDs of the records to delete permanently from the database.
isAtomicA Boolean value that indicates whether the entire operation fails when CloudKit can’t update one or more records in a record zone.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
savePolicyThe policy to apply when the server contains a newer version of a specific record.
clientChangeTokenDataA token that tracks local changes to records.
Return Value
A
Publisherthat emits the savedCKRecords and the deletedCKRecord.IDs. -
modifyWithProgress(recordsToSave:Extension methodrecordIDsToDelete: atomically: withConfiguration: savePolicy: clientChangeTokenData: ) Modifies one or more records.
See also
CKModifyRecordsOperationDeclaration
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
recordsToSaveThe records to save to the database.
recordsToDeleteThe IDs of the records to delete permanently from the database.
isAtomicA Boolean value that indicates whether the entire operation fails when CloudKit can’t update one or more records in a record zone.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
savePolicyThe policy to apply when the server contains a newer version of a specific record.
clientChangeTokenDataA token that tracks local changes to records.
Return Value
A
Publisherthat emits theProgressof the savedCKRecords, and the deletedCKRecord.IDs. -
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
recordIDThe record ID of the record to fetch.
desiredKeysThe 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.configurationThe 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
recordIDsThe record IDs of the records to fetch.
desiredKeysThe 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.configurationThe 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
recordIDThe 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
recordIDThe record ID of the record to fetch.
desiredKeysThe 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.configurationThe 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
recordIDsThe record IDs of the records to fetch.
desiredKeysThe 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.configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisherthat emits theProgressof the fetchedCKRecord.IDs and the fetchedCKRecords, 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
desiredKeysThe 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.configurationThe 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
recordTypeThe record type to search.
predicateThe predicate to use for matching records.
sortDescriptorsThe sort descriptors for organizing the query’s results.
zoneIDThe 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.
desiredKeysThe 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.configurationThe 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
queryThe query for the search.
zoneIDThe 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.
desiredKeysThe 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.configurationThe 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
saveDeclaration
Swift
public func saveAtBackgroundPriority( recordZone: CKRecordZone ) -> AnyPublisher<CKRecordZone, Error>Parameters
recordZoneThe record zone to save.
Return Value
A
Publisherthat 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
CKModifyRecordZonesOperationDeclaration
Swift
public func save( recordZone: CKRecordZone, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKRecordZone, Error>Parameters
recordZoneThe record zone to save.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisherthat emits the savedCKRecordZone, or an error if CombineCloudKit can’t save it. -
save(recordZones:Extension methodwithConfiguration: ) Saves multiple record zones.
See also
CKModifyRecordZonesOperationDeclaration
Swift
public func save( recordZones: [CKRecordZone], withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKRecordZone, Error>Parameters
recordZonesThe record zones to save.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisherthat emits the savedCKRecordZones, 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
deleteDeclaration
Swift
public func deleteAtBackgroundPriority( recordZoneID: CKRecordZone.ID ) -> AnyPublisher<CKRecordZone.ID, Error>Parameters
recordZoneIDThe ID of the record zone to delete.
Return Value
A
Publisherthat 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
CKModifyRecordZonesOperationDeclaration
Swift
public func delete( recordZoneID: CKRecordZone.ID, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKRecordZone.ID, Error>Parameters
recordZoneIDThe ID of the record zone to delete.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisherthat emits the deletedCKRecordZone.ID, or an error if CombineCloudKit can’t delete it. -
delete(recordZoneIDs:Extension methodwithConfiguration: ) Deletes multiple record zones.
See also
CKModifyRecordZonesOperationDeclaration
Swift
public func delete( recordZoneIDs: [CKRecordZone.ID], withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKRecordZone.ID, Error>Parameters
recordZoneIDsThe IDs of the record zones to delete.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisherthat emits the deletedCKRecordZone.IDs, or an error if CombineCloudKit can’t delete them. -
modify(recordZonesToSave:Extension methodrecordZoneIDsToDelete: withConfiguration: ) Modifies one or more record zones.
See also
CKModifyRecordZonesOperationDeclaration
Swift
public func modify( recordZonesToSave: [CKRecordZone]? = nil, recordZoneIDsToDelete: [CKRecordZone.ID]? = nil, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<(CKRecordZone?, CKRecordZone.ID?), Error>Parameters
recordZonesToSaveThe record zones to save.
recordZonesToDeleteThe IDs of the record zones to delete.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisherthat emits the savedCKRecordZones and the deletedCKRecordZone.IDs, 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
recordZoneIDThe ID of the record zone to fetch.
Return Value
A
Publisherthat 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
recordZoneIDThe ID of the record zone to fetch.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisherthat 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
recordZoneIDsThe IDs of the record zones to fetch.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisherthat emits theCKRecordZones, 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
Publisherthat emits theCKRecordZones, 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
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisherthat emits theCKRecordZones, 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
saveDeclaration
Swift
public func saveAtBackgroundPriority( subscription: CKSubscription ) -> AnyPublisher<CKSubscription, Error>Parameters
subscriptionThe subscription to save.
Return Value
A
Publisherthat 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
CKModifySubscriptionsOperationDeclaration
Swift
public func save( subscription: CKSubscription, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKSubscription, Error>Parameters
subscriptionThe subscription to save.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisherthat emits the savedCKSubscription, or an error if CombineCloudKit can’t save it. -
save(subscriptions:Extension methodwithConfiguration: ) Saves multiple subscriptions.
See also
CKModifySubscriptionsOperationDeclaration
Swift
public func save( subscriptions: [CKSubscription], withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKSubscription, Error>Parameters
subscriptionsThe subscriptions to save.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisherthat emits the savedCKSubscriptions, 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
deleteDeclaration
Swift
public func deleteAtBackgroundPriority( subscriptionID: CKSubscription.ID ) -> AnyPublisher<CKSubscription.ID, Error>Parameters
subscriptionIDThe ID of the subscription to delete.
Return Value
A
Publisherthat emits the deletedCKSubscription.ID, or an error if CombineCloudKit can’t delete it. -
delete(subscriptionID:Extension methodwithConfiguration: ) Deletes a single subscription.
See also
CKModifySubscriptionsOperationDeclaration
Swift
public func delete( subscriptionID: CKSubscription.ID, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKSubscription.ID, Error>Parameters
subscriptionIDThe ID of the subscription to delete.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisherthat emits the deletedCKSubscription.ID, or an error if CombineCloudKit can’t delete it. -
delete(subscriptionIDs:Extension methodwithConfiguration: ) Deletes multiple subscriptions.
See also
CKModifySubscriptionsOperationDeclaration
Swift
public func delete( subscriptionIDs: [CKSubscription.ID], withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<CKSubscription.ID, Error>Parameters
subscriptionIDsThe IDs of the subscriptions to delete.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisherthat emits the deletedCKSubscription.IDs, or an error if CombineCloudKit can’t delete them. -
Modifies one or more subscriptions.
See also
CKModifySubscriptionsOperationDeclaration
Swift
public func modify( subscriptionsToSave: [CKSubscription]? = nil, subscriptionIDsToDelete: [CKSubscription.ID]? = nil, withConfiguration configuration: CKOperation.Configuration? = nil ) -> AnyPublisher<(CKSubscription?, CKSubscription.ID?), Error>Parameters
subscriptionsToSaveThe subscriptions to save.
subscriptionsToDeleteThe IDs of the subscriptions to delete.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisherthat emits the savedCKSubscriptions and the deletedCKSubscription.IDs, 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
subscriptionIDThe ID of the subscription to fetch.
Return Value
A
Publisherthat 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
subscriptionIDThe ID of the subscription to fetch.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisherthat 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
subscriptionIDsThe IDs of the subscriptions to fetch.
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisherthat emits theCKSubscriptions, 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
Publisherthat emits theCKSubscriptions, 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
configurationThe configuration to use for the underlying operation. If you don’t specify a configuration, the operation will use a default configuration.
Return Value
A
Publisherthat emits theCKSubscriptions, or an error if CombineCloudKit can’t fetch them.
View on GitHub
CCKDatabase Protocol Reference