A report containing metric data entries collected during the reporting period.
Members (5)
get · iOS 27.0+
environment
TypeScript
get environment(): (MetricReport_Environment) | null
Swift declaration
let environment: MetricReport.Environment?
Environment context for the device and app.
This is `nil` when device or app metadata cannot be determined during metric aggregation.
get · iOS 27.0+
stateEntries
TypeScript
get stateEntries(): Array<MetricReport_StateEntry>
Swift declaration
let stateEntries: [MetricReport.StateEntry]
State-aggregated metric entries collected during the reporting period.
Each entry contains metrics aggregated by a single StateReporting state.
get · iOS 27.0+
intervalEntries
TypeScript
get intervalEntries(): Array<MetricReport_IntervalEntry>
Swift declaration
let intervalEntries: [MetricReport.IntervalEntry]
Interval-aggregated metric entries collected during the reporting period.
Each entry contains metrics aggregated by a collection interval, with all states
that were active during that interval.
get · iOS 27.0+
encodingFormatKey
TypeScript
static get encodingFormatKey(): SDKHandle
Swift declaration
static let encodingFormatKey: CodingUserInfoKey
User info key for configuring MetricReport encoding format.
Use this key with JSONEncoder's userInfo to control how MetricReport is encoded.
## Example
```swift
let encoder = JSONEncoder()
encoder.userInfo[MetricReport.encodingFormatKey] = MetricReport.EncodingFormat.byStateReportingDomain
let jsonData = try encoder.encode(metricReport)
```