Contents

DiagnosticReport.Environment

Device, app, and state metadata associated with a diagnostic report.

Declaration

struct Environment

Mentioned in

Discussion

DiagnosticReport.Environment carries device and app context alongside state and signpost data captured around the time of the diagnostic event.

Access the app states that were active when the event occurred through states. Use signpostData to correlate signpost events with the diagnostic:

for await report in manager.diagnosticReports {
    let environment = report.environment
    print(environment.osVersion, environment.applicationVersion)

    for state in environment.states {
        print(state.domain, state.label)
    }
}

Topics

Device information

App information

System state

State reporting context

Signpost data

Instance Properties