<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ContactProvider",
  "identifier" : "/documentation/ContactProvider/ContactItemEnumerator/enumerateContent(in:for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "ContactProvider"
    ],
    "preciseIdentifier" : "s:15ContactProvider0A14ItemEnumeratorP16enumerateContent2in3foryAA0aC4PageV_AA0acF8Observer_ptYaF"
  },
  "title" : "enumerateContent(in:for:)"
}
-->

# enumerateContent(in:for:)

Enumerates all items, batched in pages.

```
func enumerateContent(in page: ContactItemPage, for observer: any ContactItemContentObserver) async
```

## Parameters

`page`

The page to enumerate items from.

`observer`

The system observer that receives the content items and
enumeration state.

## Discussion

The system calls `enumerateContent(in:for:)` for each page of items to enumerate.
Your implementation calls [`didFinishEnumeratingPage(upTo:)`](/documentation/ContactProvider/ContactItemContentObserver/didFinishEnumeratingPage(upTo:)) after enumerating each page, excluding the last page.
After enumerating the last page, your implementation calls [`didFinishEnumeratingContent(upTo:)`](/documentation/ContactProvider/ContactItemContentObserver/didFinishEnumeratingContent(upTo:)).

Your implementation can enumerate items in any order, but the order must be deterministic and resumable.
The system starts a new content enumeration with [`initialPage`](/documentation/ContactProvider/ContactItemPage/initialPage).

During content enumeration, every [`ContactItemPage`](/documentation/ContactProvider/ContactItemPage) except [`initialPage`](/documentation/ContactProvider/ContactItemPage/initialPage) must use the same [`generationMarker`](/documentation/ContactProvider/ContactItemPage/generationMarker), which represents the state of the content at a specific point in time.
Changes made during the content enumeration can sync later with a change enumeration.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)