init
TypeScriptinitRawValue(rawValue: string): Promise<DeviceActivityReport_Context>Swift declarationinit(rawValue: String)Creates a new instance with the specified raw value. - Parameters: - rawValue: The raw value to use for the new instance.
struct · iOS 16.0+ · SDK 27.1
struct ContextA context indicating how your device activity report extension should configure its ``DeviceActivityReportView``. You can use a ``Context`` to create a ``DeviceActivityReport``, which the system then provides to your app's extension and allows it to configure the resulting report `View` in a particular way. For example, if you want to render either a pie chart or bar graph representing the user's device activity, you can create the following custom contexts: extension DeviceActivityReport.Context { static let barGraph = Self("barGraph") static let pieChart = Self("pieChart") } If your app instantiates a report with the `barGraph` context, then the system prompts your report extension to generate a view using the ``Scene`` corresponding to that context.
initRawValue(rawValue: string): Promise<DeviceActivityReport_Context>Swift declarationinit(rawValue: String)Creates a new instance with the specified raw value. - Parameters: - rawValue: The raw value to use for the new instance.
getRawValue($self: DeviceActivityReport_Context): Promise<string>Swift declarationvar rawValue: StringThe underlying value that represents the given context.
setRawValue($self: DeviceActivityReport_Context, value: string): Promise<void>Swift declarationvar rawValue: StringThe underlying value that represents the given context.
init(rawValue: string): Promise<DeviceActivityReport_Context>Swift declarationinit(_ rawValue: String)Creates a new instance with the specified raw value. - Parameters: - rawValue: The raw value to use for the new instance.
No declarations were skipped in this snapshot.