<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSMetadataQuery/enumerateResults(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSMetadataQuery(im)enumerateResultsUsingBlock:"
  },
  "title" : "enumerateResults(_:)"
}
-->

# enumerateResults(_:)

Enumerates the current set of results using the given block.

```
func enumerateResults(_ block: (Any, Int, UnsafeMutablePointer<ObjCBool>) -> Void)
```

## Parameters

`block`

The block to execute for each current result.

## Discussion

This method disables the query at the start of the iteration and reenables it upon completion. Use [`enumerateResults(options:using:)`](/documentation/Foundation/NSMetadataQuery/enumerateResults(options:using:)) if you want to use concurrent or reverse iteration.

---

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)