Contents

record(for:)

Fetches a specific record.

Declaration

func record(for recordID: CKRecord.ID) async throws -> CKRecord

Parameters

  • recordID:

    The identifier of the record to fetch.

Return Value

The requested record.

Discussion

This method throws an error if the record cannot be found or if 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 fetch specific records, see records(for:desiredKeys:).