<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKQuery/predicateForUserAnnotatedMedications(isArchived:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HKQuery(cm)predicateForUserAnnotatedMedicationsWithIsArchived:"
  },
  "title" : "predicateForUserAnnotatedMedications(isArchived:)"
}
-->

# predicateForUserAnnotatedMedications(isArchived:)

```
class func predicateForUserAnnotatedMedications(isArchived: Bool) -> NSPredicate
```

## Parameters

`isArchived`

The archived status of the medication. Ex: True will match medications in the archived section in the Health App.

## Discussion

\abstract Creates a predicate for use with HKUserAnnotatedMedicationQuery.
\discussion Creates a query predicate that matches HKUserAnnotatedMedication objects that have the archived status specified.

---

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)