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
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 method, asynchronouswithConfiguration: 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 ) async throws -> CKRecord
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.
Return Value
The saved
CKRecord
. -
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 ) -> ACKSequence<CKRecord>
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.
Return Value
An
ACKSequence
that emits the savedCKRecord
s. -
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
save
Declaration
Swift
public func saveAtBackgroundPriority(record: CKRecord) async throws -> CKRecord
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.
Return Value
The saved
CKRecord
. -
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 ) -> ACKSequence<(CKRecord, Progress)>
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.
Return Value
An
ACKSequence
that emits theProgress
of the savedCKRecord
. -
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 ) -> ACKSequence<(CKRecord, Progress)>
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.
Return Value
An
ACKSequence
that emits theProgress
of the savedCKRecord
s. -
delete(recordID:
Extension method, asynchronouswithConfiguration: ) Deletes a single record.
See also
CKModifyRecordsOperation
Declaration
Swift
public func delete( recordID: CKRecord.ID, withConfiguration configuration: CKOperation.Configuration? = nil ) async throws -> CKRecord.ID
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
The deleted
CKRecord.ID
. -
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 ) -> ACKSequence<CKRecord.ID>
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
An
ACKSequence
that emits the deletedCKRecord.ID
s. -
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
delete
Declaration
Swift
public func deleteAtBackgroundPriority(recordID: CKRecord.ID) async throws -> CKRecord.ID
Parameters
recordID
The 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
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 ) -> ACKSequence<(CKRecord?, CKRecord.ID?)>
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
An
ACKSequence
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 ) -> ACKSequence<((CKRecord, Progress)?, CKRecord.ID?)>
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
An
ACKSequence
that emits theProgress
of the savedCKRecord
s, and the deletedCKRecord.ID
s. -
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 -> CKRecord
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.
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
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
An
ACKSequence
that emits the fetchedCKRecord
s. -
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 -> CKRecord
Parameters
recordID
The 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
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.
Return Value
An
ACKSequence
that emitsProgress
and the fetchedCKRecord
on 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
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
An
ACKSequence
that emits theProgress
of the fetchedCKRecord.ID
s and the fetchedCKRecord
s. -
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 -> CKRecord
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.
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
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.
Return Value
An
ACKSequence
that emits any matchingCKRecord
s. -
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
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.
resultsLimit
The maximum number of records to buffer at a time.
Return Value
An
ACKSequence
that emits any matchingCKRecord
s. -
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
save
Declaration
Swift
public func saveAtBackgroundPriority(recordZone: CKRecordZone) async throws -> CKRecordZone
Parameters
recordZone
The record zone to save.
Return Value
The saved
CKRecordZone
. -
save(recordZone:
Extension method, asynchronouswithConfiguration: ) Saves a single record zone.
See also
CKModifyRecordZonesOperation
Declaration
Swift
public func save( recordZone: CKRecordZone, withConfiguration configuration: CKOperation.Configuration? = nil ) async throws -> CKRecordZone
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
The saved
CKRecordZone
. -
save(recordZones:
Extension methodwithConfiguration: ) Saves multiple record zones.
See also
CKModifyRecordZonesOperation
Declaration
Swift
public func save( recordZones: [CKRecordZone], withConfiguration configuration: CKOperation.Configuration? = nil ) -> ACKSequence<CKRecordZone>
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
An
ACKSequence
that emits the savedCKRecordZone
s. -
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
delete
Declaration
Swift
public func deleteAtBackgroundPriority(recordZoneID: CKRecordZone.ID) async throws -> CKRecordZone.ID
Parameters
recordZoneID
The 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
CKModifyRecordZonesOperation
Declaration
Swift
public func delete( recordZoneID: CKRecordZone.ID, withConfiguration configuration: CKOperation.Configuration? = nil ) async throws -> CKRecordZone.ID
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
The deleted
CKRecordZone.ID
. -
delete(recordZoneIDs:
Extension methodwithConfiguration: ) Deletes multiple record zones.
See also
CKModifyRecordZonesOperation
Declaration
Swift
public func delete( recordZoneIDs: [CKRecordZone.ID], withConfiguration configuration: CKOperation.Configuration? = nil ) -> ACKSequence<CKRecordZone.ID>
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
An
ACKSequence
that emits the deletedCKRecordZone.ID
s. -
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 ) -> ACKSequence<(CKRecordZone?, CKRecordZone.ID?)>
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
An
ACKSequence
that emits the savedCKRecordZone
s and the deletedCKRecordZone.ID
s. -
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 -> CKRecordZone
Parameters
recordZoneID
The 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 -> CKRecordZone
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
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
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
An
ACKSequence
that emits theCKRecordZone
s. -
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
ACKSequence
that emits theCKRecordZone
s. -
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
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
An
ACKSequence
that emits theCKRecordZone
s. -
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
save
Declaration
Swift
public func saveAtBackgroundPriority(subscription: CKSubscription) async throws -> CKSubscription
Parameters
subscription
The subscription to save.
Return Value
The saved
CKSubscription
. -
save(subscription:
Extension method, asynchronouswithConfiguration: ) Saves a single subscription.
See also
CKModifySubscriptionsOperation
Declaration
Swift
public func save( subscription: CKSubscription, withConfiguration configuration: CKOperation.Configuration? = nil ) async throws -> CKSubscription
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
The saved
CKSubscription
. -
save(subscriptions:
Extension methodwithConfiguration: ) Saves multiple subscriptions.
See also
CKModifySubscriptionsOperation
Declaration
Swift
public func save( subscriptions: [CKSubscription], withConfiguration configuration: CKOperation.Configuration? = nil ) -> ACKSequence<CKSubscription>
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
An
ACKSequence
that emits the savedCKSubscription
s. -
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
delete
Declaration
Swift
public func deleteAtBackgroundPriority(subscriptionID: CKSubscription.ID) async throws -> CKSubscription.ID
Parameters
subscriptionID
The ID of the subscription to delete.
Return Value
The deleted
CKSubscription.ID
. -
delete(subscriptionID:
Extension method, asynchronouswithConfiguration: ) Deletes a single subscription.
See also
CKModifySubscriptionsOperation
Declaration
Swift
public func delete( subscriptionID: CKSubscription.ID, withConfiguration configuration: CKOperation.Configuration? = nil ) async throws -> CKSubscription.ID
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
The deleted
CKSubscription.ID
. -
delete(subscriptionIDs:
Extension methodwithConfiguration: ) Deletes multiple subscriptions.
See also
CKModifySubscriptionsOperation
Declaration
Swift
public func delete( subscriptionIDs: [CKSubscription.ID], withConfiguration configuration: CKOperation.Configuration? = nil ) -> ACKSequence<CKSubscription.ID>
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
An
ACKSequence
that emits the deletedCKSubscription.ID
s. -
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 ) -> ACKSequence<(CKSubscription?, CKSubscription.ID?)>
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
An
ACKSequence
that emits the savedCKSubscription
s and the deletedCKSubscription.ID
s. -
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 -> CKSubscription
Parameters
subscriptionID
The 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 -> CKSubscription
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
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
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
An
ACKSequence
that emits theCKSubscription
s. -
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
ACKSequence
that emits theCKSubscription
s. -
fetchAllSubscriptions(withConfiguration:
Extension method) Fetches the database’s subscriptions.
See also
fetchAllSubscriptionsOperationDeclaration
Swift
public func fetchAllSubscriptions( withConfiguration configuration: CKOperation.Configuration? = nil ) -> ACKSequence<CKSubscription>
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
An
ACKSequence
that emits theCKSubscription
s.