deleteSubscription(withID:)
Deletes a specific subscription and returns the deleted subscription’s identifier to an awaiting caller.
Declaration
@discardableResult func deleteSubscription(withID subscriptionID: CKSubscription.ID) async throws -> CKSubscription.IDParameters
- subscriptionID:
The identifier of the subscription to delete.
Return Value
The identifier of the deleted subscription.
Discussion
This method throws an error if the request fails, such as when the network is unavailable or the device doesn’t have an active iCloud account.
For information on a more convenient way to delete subscriptions, see modifySubscriptions(saving:deleting:).