<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetricKit",
  "identifier" : "/documentation/MetricKit/DiagnosticReport/Environment-swift.struct/states",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "MetricKit"
    ],
    "preciseIdentifier" : "s:9MetricKit16DiagnosticReportV11EnvironmentV6statesSayAA0A7ManagerC13ReportedStateVGvp"
  },
  "title" : "states"
}
-->

# states

All states that were active leading up to this diagnostic event.

```
let states: [MetricManager.ReportedState]
```

## Discussion

This array contains all the StateReporting states that occurred before the diagnostic event.
The array may be empty if no StateReporting context was active.

---

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)