<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKAnchoredObjectQueryNoAnchor",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:@macro@HKAnchoredObjectQueryNoAnchor"
  },
  "title" : "HKAnchoredObjectQueryNoAnchor"
}
-->

# HKAnchoredObjectQueryNoAnchor

An anchor that returns all of the matching samples currently in the HealthKit store.

```
var HKAnchoredObjectQueryNoAnchor: Int32 { get }
```

## Discussion

> Important:
> Only use this constant to support iOS 8 (using the deprecated ``doc://com.apple.healthkit/documentation/HealthKit/HKAnchoredObjectQuery/init(type:predicate:anchor:limit:completionHandler:)`` method). In iOS 9 and later, use ``doc://com.apple.healthkit/documentation/HealthKit/HKAnchoredObjectQuery/init(type:predicate:anchor:limit:resultsHandler:)`` and pass `nil` instead.

Use this constant the first time you perform an anchored object query. The resulting query returns all the matching samples currently in the HealthKit store. For subsequent anchored object queries, use the anchor returned by the previous query. The resulting query returns only samples that have been added to the HealthKit store since the previous query.

---

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)