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

    fetch

    Declaration

    Swift

    func fetch(
      withRecordID recordID: CKRecord.ID, completionHandler: @escaping (CKRecord?, Error?) -> Void)
  • Implemented by CKDatabase.

    See also

    fetch

    Declaration

    Swift

    func fetch(
      withRecordZoneID zoneID: CKRecordZone.ID,
      completionHandler: @escaping (CKRecordZone?, Error?) -> Void)
  • Implemented by CKDatabase.

    See also

    fetch

    Declaration

    Swift

    func fetch(
      withSubscriptionID subscriptionID: CKSubscription.ID,
      completionHandler: @escaping (CKSubscription?, Error?) -> Void)
  • Implemented by CKDatabase.

    Declaration

    Swift

    func fetchAllRecordZones(completionHandler: @escaping ([CKRecordZone]?, Error?) -> Void)
  • Implemented by CKDatabase.

    Declaration

    Swift

    func fetchAllSubscriptions(completionHandler: @escaping ([CKSubscription]?, Error?) -> Void)
  • Implemented by CKDatabase.

    Declaration

    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)
  • Saves a single record.

    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.

    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 saved CKRecords.

  • 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.

    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 the Progress of the saved CKRecord.

  • Saves multiple records.

    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 the Progress of the saved CKRecords.

  • delete(recordID:withConfiguration:) Extension method, asynchronous

    Deletes a single record.

    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.

  • Deletes multiple records.

    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 deleted CKRecord.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

    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.

  • Modifies one or more records.

    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 saved CKRecords and the deleted CKRecord.IDs.

  • Modifies one or more records.

    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 the Progress of the saved CKRecords, and the deleted CKRecord.IDs.

  • fetch(recordID:desiredKeys:withConfiguration:) Extension method, asynchronous

    Fetches the record with the specified ID.

    Declaration

    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.

  • Fetches multiple records.

    Declaration

    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 fetched CKRecords.

  • 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

    fetch

    Declaration

    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.

  • Fetches the record with the specified ID.

    Declaration

    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 emits Progress and the fetched CKRecord on completion.

  • Fetches multiple records.

    Declaration

    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 the Progress of the fetched CKRecord.IDs and the fetched CKRecords.

  • Fetches the current user record.

    Declaration

    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

    CKQuery

    See also

    CKQueryOperation

    See also

    NSPredicate

    See also

    NSSortDescriptor

    Declaration

    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 matching CKRecords.

  • Fetches records that match the specified query.

    See also

    CKQuery

    See also

    CKQueryOperation

    See also

    NSPredicate

    See also

    NSSortDescriptor

    Declaration

    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 matching CKRecords.

  • 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:withConfiguration:) Extension method, asynchronous

    Saves a single record zone.

    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.

  • Saves multiple record zones.

    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 saved CKRecordZones.

  • 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:withConfiguration:) Extension method, asynchronous

    Deletes a single record zone.

    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.

  • Deletes multiple record zones.

    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 deleted CKRecordZone.IDs.

  • Modifies one or more record zones.

    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 saved CKRecordZones and the deleted CKRecordZone.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

    fetch

    Declaration

    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:withConfiguration:) Extension method, asynchronous

    Fetches the record zone with the specified ID.

    Declaration

    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.

  • Fetches multiple record zones.

    Declaration

    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 the CKRecordZones.

  • Fetches 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.

    Declaration

    Swift

    public func fetchAllRecordZonesAtBackgroundPriority() -> ACKSequence<CKRecordZone>

    Return Value

    An ACKSequence that emits the CKRecordZones.

  • Fetches the database’s record zones.

    Declaration

    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 the CKRecordZones.

  • 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:withConfiguration:) Extension method, asynchronous

    Saves a single subscription.

    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.

  • Saves multiple subscriptions.

    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 saved CKSubscriptions.

  • 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:withConfiguration:) Extension method, asynchronous

    Deletes a single subscription.

    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.

  • Deletes multiple subscriptions.

    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 deleted CKSubscription.IDs.

  • Modifies one or more subscriptions.

    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 saved CKSubscriptions and the deleted CKSubscription.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

    fetch

    Declaration

    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:withConfiguration:) Extension method, asynchronous

    Fetches the subscription with the specified ID.

    Declaration

    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.

  • Fetches multiple subscriptions.

    Declaration

    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 the CKSubscriptions.

  • Fetches the database’s subscriptions.

    Note

    AsyncCloudKit executes the fetch with a low priority. Use this method when you don’t require the subscriptions immediately.

    Declaration

    Swift

    public func fetchAllSubscriptionsAtBackgroundPriority() -> ACKSequence<CKSubscription>

    Return Value

    An ACKSequence that emits the CKSubscriptions.

  • Fetches the database’s subscriptions.

    Declaration

    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 the CKSubscriptions.