---
title: "finishEnumerating(upTo:)"
framework: fileprovider
role: symbol
role_heading: Instance Method
path: "fileprovider/nsfileprovidersearchenumerationobserver/finishenumerating(upto:)"
---

# finishEnumerating(upTo:)

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

## Declaration

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

## Discussion

Discussion Call this method after you make one or more calls to 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:) method. note: The NSFileProviderPage data payload is limited to 500 bytes. Sending a nextPage larger than this interrupts the enumeration.

## See Also

### Ending enumeration

- [finishEnumeratingWithError(_:)](fileprovider/nsfileprovidersearchenumerationobserver/finishenumeratingwitherror(_:).md)
