<!--
{
  "availability" : [
    "macOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FileProvider",
  "identifier" : "/documentation/FileProvider/NSFileProviderSearchEnumerationObserver/finishEnumerating(upTo:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "File Provider"
    ],
    "preciseIdentifier" : "c:objc(pl)NSFileProviderSearchEnumerationObserver(im)finishEnumeratingUpToPage:"
  },
  "title" : "finishEnumerating(upTo:)"
}
-->

# finishEnumerating(upTo:)

Finish enumerating a page of results, and optionally provide a location within the results to continue the enumeration.

```
func finishEnumerating(upTo nextPage: NSFileProviderPage?)
```

## Discussion

Call this method after you make one or more calls to [`didEnumerate(_:)`](/documentation/FileProvider/NSFileProviderSearchEnumerationObserver/didEnumerate(_:)) to provide results to the observer.
The collective results you provide in these calls constitues a “page” of results.

Finish your page before sending `NSFileProviderSearchEnumerationObserver/maxNumberOfResults`.
If you have more results to provide, use the `nextPage` parameter to indicate where to continue in your result set.
The system sends the `nextPage` parameter the next time it calls your [`enumerateSearchResults(for:startingAt:)`](/documentation/FileProvider/NSFileProviderSearchEnumerator/enumerateSearchResults(for:startingAt:)) method.

> Note: the ``doc://com.apple.fileprovider/documentation/FileProvider/NSFileProviderPage`` data payload is limited to 500 bytes. Sending a `nextPage` larger than this interrupts the 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)