Contents

records(matching:inZoneWith:)

Searches for records in the specified record zone and returns them to an awaiting caller.

Declaration

func records(matching query: CKQuery, inZoneWith zoneID: CKRecordZone.ID?) async throws -> [CKRecord]

Parameters

  • query:

    The query that contains the search parameters. For more information, see Ckquery.

  • zoneID:

    The identifier of the record zone to search. If you’re searching a shared database, provide a record zone identifier; otherwise, you can specify nil to search all record zones in the database.

Return Value

An array of records that match the specified query.

Discussion

For information on a more configurable way to search a database, see CKQueryOperation.

See Also

Querying Records