---
title: "recordZones(for:)"
framework: cloudkit
role: symbol
role_heading: Instance Method
path: "cloudkit/ckdatabase/recordzones(for:)"
---

# recordZones(for:)

Fetches the specified record zones and returns them to an awaiting caller.

## Declaration

```swift
func recordZones(for ids: [CKRecordZone.ID]) async throws -> [CKRecordZone.ID : Result<CKRecordZone, any Error>]
```

## Parameters

- `ids`: The identifiers of the record zones to fetch.

## Return Value

Return Value A dictionary that contains the fetched record zones. The dictionary uses the specified record zone identifiers as its keys. The value of each key is a Result that contains either the corresponding fetched record zone, or an error that describes why CloudKit can’t provide that record zone.

## Discussion

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; otherwise, the returned dictionary includes any individual record zone errors. For information on a more configurable way to fetch specific record zones, see CKFetchRecordZonesOperation.

## See Also

### Fetching Record Zones

- [fetch(withRecordZoneIDs:completionHandler:)](cloudkit/ckdatabase/fetch(withrecordzoneids:completionhandler:).md)
- [fetchAllRecordZones(completionHandler:)](cloudkit/ckdatabase/fetchallrecordzones(completionhandler:).md)
- [fetch(withRecordZoneID:completionHandler:)](cloudkit/ckdatabase/fetch(withrecordzoneid:completionhandler:).md)
