ACKDatabase
public protocol ACKDatabase
A protocol used to abstract a CKDatabase.
Invoke the async extension methods on your
CKDatabase
instances to process records, record zones, and subscriptions asynchronously.
See also
CloudKit
-
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 method, asynchronouswithConfiguration: 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 ) async throws -> CKRecordParameters
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.
Return Value
The saved
CKRecord. -
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 ) -> ACKSequence<CKRecord>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.
Return Value
An
ACKSequencethat emits the savedCKRecords. -
saveAtBackgroundPriority(record:Extension method, asynchronous) Saves a single record.
Note
AsyncCloudKit 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) async throws -> CKRecordParameters
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.
Return Value
The saved
CKRecord. -
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 ) -> ACKSequence<(CKRecord, Progress)>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.
Return Value
An
ACKSequencethat emits theProgressof the savedCKRecord. -
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 ) -> ACKSequence<(CKRecord, Progress)>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.
Return Value
An
ACKSequencethat emits theProgressof the savedCKRecords. -
delete(recordID:Extension method, asynchronouswithConfiguration: ) Deletes a single record.
See also
CKModifyRecordsOperationDeclaration
Swift
public func delete( recordID: CKRecord.ID, withConfiguration configuration: CKOperation.Configuration? = nil ) async throws -> CKRecord.IDParameters
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
The deleted
CKRecord.ID. -
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 ) -> ACKSequence<CKRecord.ID>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
An
ACKSequencethat emits the deletedCKRecord.IDs. -
deleteAtBackgroundPriority(recordID:Extension method, asynchronous) Deletes a single record.
Note
AsyncCloudKit 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) async throws -> CKRecord.IDParameters
recordIDThe ID of the record to delete permanently from the database.
Return Value
The deleted
CKRecord.ID. -
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 ) -> ACKSequence<(CKRecord?, CKRecord.ID?)>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
An
ACKSequencethat 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 ) -> ACKSequence<((CKRecord, Progress)?, CKRecord.ID?)>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
An
ACKSequencethat emits theProgressof the savedCKRecords, and the deletedCKRecord.IDs. -
fetch(recordID:Extension method, asynchronousdesiredKeys: 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 ) async throws -> CKRecordParameters
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.
Return Value
The fetched
CKRecord. -
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 ) -> ACKSequence<CKRecord>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
An
ACKSequencethat emits the fetchedCKRecords. -
fetchAtBackgroundPriority(withRecordID:Extension method, asynchronous) Fetches the record with the specified ID.
Note
AsyncCloudKit 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) async throws -> CKRecordParameters
recordIDThe record ID of the record to fetch.
Return Value
The
CKRecord. -
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 ) -> ACKSequence<((CKRecord.ID, Progress)?, CKRecord?)>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.
Return Value
An
ACKSequencethat emitsProgressand the fetchedCKRecordon completion. -
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 ) -> ACKSequence<((CKRecord.ID, Progress)?, CKRecord?)>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
An
ACKSequencethat emits theProgressof the fetchedCKRecord.IDs and the fetchedCKRecords. -
fetchCurrentUserRecord(desiredKeys:Extension method, asynchronouswithConfiguration: ) Fetches the current user record.
See also
fetchCurrentUserRecordOperationDeclaration
Swift
public func fetchCurrentUserRecord( desiredKeys _: [CKRecord.FieldKey]? = nil, withConfiguration configuration: CKOperation.Configuration? = nil ) async throws -> CKRecordParameters
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.
Return Value
The
CKRecord. -
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 ) -> ACKSequence<CKRecord>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.
Return Value
An
ACKSequencethat emits any matchingCKRecords. -
perform(_:Extension methodinZoneWith: desiredKeys: withConfiguration: resultsLimit: ) 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, resultsLimit: Int = CKQueryOperation.maximumResults ) -> ACKSequence<CKRecord>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.
resultsLimitThe maximum number of records to buffer at a time.
Return Value
An
ACKSequencethat emits any matchingCKRecords. -
saveAtBackgroundPriority(recordZone:Extension method, asynchronous) Saves a single record zone.
Note
AsyncCloudKit 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) async throws -> CKRecordZoneParameters
recordZoneThe record zone to save.
Return Value
The saved
CKRecordZone. -
save(recordZone:Extension method, asynchronouswithConfiguration: ) Saves a single record zone.
See also
CKModifyRecordZonesOperationDeclaration
Swift
public func save( recordZone: CKRecordZone, withConfiguration configuration: CKOperation.Configuration? = nil ) async throws -> CKRecordZoneParameters
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
The saved
CKRecordZone. -
save(recordZones:Extension methodwithConfiguration: ) Saves multiple record zones.
See also
CKModifyRecordZonesOperationDeclaration
Swift
public func save( recordZones: [CKRecordZone], withConfiguration configuration: CKOperation.Configuration? = nil ) -> ACKSequence<CKRecordZone>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
An
ACKSequencethat emits the savedCKRecordZones. -
deleteAtBackgroundPriority(recordZoneID:Extension method, asynchronous) Deletes a single record zone.
Note
AsyncCloudKit 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) async throws -> CKRecordZone.IDParameters
recordZoneIDThe ID of the record zone to delete.
Return Value
The deleted
CKRecordZone.ID. -
delete(recordZoneID:Extension method, asynchronouswithConfiguration: ) Deletes a single record zone.
See also
CKModifyRecordZonesOperationDeclaration
Swift
public func delete( recordZoneID: CKRecordZone.ID, withConfiguration configuration: CKOperation.Configuration? = nil ) async throws -> CKRecordZone.IDParameters
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
The deleted
CKRecordZone.ID. -
delete(recordZoneIDs:Extension methodwithConfiguration: ) Deletes multiple record zones.
See also
CKModifyRecordZonesOperationDeclaration
Swift
public func delete( recordZoneIDs: [CKRecordZone.ID], withConfiguration configuration: CKOperation.Configuration? = nil ) -> ACKSequence<CKRecordZone.ID>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
An
ACKSequencethat emits the deletedCKRecordZone.IDs. -
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 ) -> ACKSequence<(CKRecordZone?, CKRecordZone.ID?)>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
An
ACKSequencethat emits the savedCKRecordZones and the deletedCKRecordZone.IDs. -
fetchAtBackgroundPriority(withRecordZoneID:Extension method, asynchronous) Fetches the record zone with the specified ID.
Note
AsyncCloudKit 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) async throws -> CKRecordZoneParameters
recordZoneIDThe ID of the record zone to fetch.
Return Value
The
CKRecordZone. -
fetch(recordZoneID:Extension method, asynchronouswithConfiguration: ) Fetches the record zone with the specified ID.
See also
CKFetchRecordZonesOperationDeclaration
Swift
public func fetch( recordZoneID: CKRecordZone.ID, withConfiguration configuration: CKOperation.Configuration? = nil ) async throws -> CKRecordZoneParameters
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
The
CKRecordZone. -
fetch(recordZoneIDs:Extension methodwithConfiguration: ) Fetches multiple record zones.
See also
CKFetchRecordZonesOperationDeclaration
Swift
public func fetch( recordZoneIDs: [CKRecordZone.ID], withConfiguration configuration: CKOperation.Configuration? = nil ) -> ACKSequence<CKRecordZone>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
An
ACKSequencethat emits theCKRecordZones. -
fetchAllRecordZonesAtBackgroundPriority()Extension methodFetches the database’s record zones.
Note
AsyncCloudKit 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() -> ACKSequence<CKRecordZone>Return Value
An
ACKSequencethat emits theCKRecordZones. -
fetchAllRecordZones(withConfiguration:Extension method) Fetches the database’s record zones.
See also
fetchAllRecordZonesOperationDeclaration
Swift
public func fetchAllRecordZones( withConfiguration configuration: CKOperation.Configuration? = nil ) -> ACKSequence<CKRecordZone>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
An
ACKSequencethat emits theCKRecordZones. -
saveAtBackgroundPriority(subscription:Extension method, asynchronous) Saves a single subscription.
Note
AsyncCloudKit 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) async throws -> CKSubscriptionParameters
subscriptionThe subscription to save.
Return Value
The saved
CKSubscription. -
save(subscription:Extension method, asynchronouswithConfiguration: ) Saves a single subscription.
See also
CKModifySubscriptionsOperationDeclaration
Swift
public func save( subscription: CKSubscription, withConfiguration configuration: CKOperation.Configuration? = nil ) async throws -> CKSubscriptionParameters
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
The saved
CKSubscription. -
save(subscriptions:Extension methodwithConfiguration: ) Saves multiple subscriptions.
See also
CKModifySubscriptionsOperationDeclaration
Swift
public func save( subscriptions: [CKSubscription], withConfiguration configuration: CKOperation.Configuration? = nil ) -> ACKSequence<CKSubscription>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
An
ACKSequencethat emits the savedCKSubscriptions. -
deleteAtBackgroundPriority(subscriptionID:Extension method, asynchronous) Deletes a single subscription.
Note
AsyncCloudKit 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) async throws -> CKSubscription.IDParameters
subscriptionIDThe ID of the subscription to delete.
Return Value
The deleted
CKSubscription.ID. -
delete(subscriptionID:Extension method, asynchronouswithConfiguration: ) Deletes a single subscription.
See also
CKModifySubscriptionsOperationDeclaration
Swift
public func delete( subscriptionID: CKSubscription.ID, withConfiguration configuration: CKOperation.Configuration? = nil ) async throws -> CKSubscription.IDParameters
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
The deleted
CKSubscription.ID. -
delete(subscriptionIDs:Extension methodwithConfiguration: ) Deletes multiple subscriptions.
See also
CKModifySubscriptionsOperationDeclaration
Swift
public func delete( subscriptionIDs: [CKSubscription.ID], withConfiguration configuration: CKOperation.Configuration? = nil ) -> ACKSequence<CKSubscription.ID>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
An
ACKSequencethat emits the deletedCKSubscription.IDs. -
Modifies one or more subscriptions.
See also
CKModifySubscriptionsOperationDeclaration
Swift
public func modify( subscriptionsToSave: [CKSubscription]? = nil, subscriptionIDsToDelete: [CKSubscription.ID]? = nil, withConfiguration configuration: CKOperation.Configuration? = nil ) -> ACKSequence<(CKSubscription?, CKSubscription.ID?)>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
An
ACKSequencethat emits the savedCKSubscriptions and the deletedCKSubscription.IDs. -
fetchAtBackgroundPriority(withSubscriptionID:Extension method, asynchronous) Fetches the subscription with the specified ID.
Note
AsyncCloudKit 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) async throws -> CKSubscriptionParameters
subscriptionIDThe ID of the subscription to fetch.
Return Value
The
CKSubscription. -
fetch(subscriptionID:Extension method, asynchronouswithConfiguration: ) Fetches the subscription with the specified ID.
See also
CKFetchSubscriptionsOperationDeclaration
Swift
public func fetch( subscriptionID: CKSubscription.ID, withConfiguration configuration: CKOperation.Configuration? = nil ) async throws -> CKSubscriptionParameters
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
The
CKSubscription. -
fetch(subscriptionIDs:Extension methodwithConfiguration: ) Fetches multiple subscriptions.
See also
CKFetchSubscriptionsOperationDeclaration
Swift
public func fetch( subscriptionIDs: [CKSubscription.ID], withConfiguration configuration: CKOperation.Configuration? = nil ) -> ACKSequence<CKSubscription>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
An
ACKSequencethat emits theCKSubscriptions. -
fetchAllSubscriptionsAtBackgroundPriority()Extension methodFetches the database’s subscriptions.
Note
AsyncCloudKit 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() -> ACKSequence<CKSubscription>Return Value
An
ACKSequencethat emits theCKSubscriptions. -
fetchAllSubscriptions(withConfiguration:Extension method) Fetches the database’s subscriptions.
See also
fetchAllSubscriptionsOperationDeclaration
Swift
public func fetchAllSubscriptions( withConfiguration configuration: CKOperation.Configuration? = nil ) -> ACKSequence<CKSubscription>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
An
ACKSequencethat emits theCKSubscriptions.
View on GitHub
ACKDatabase Protocol Reference