Contents

getDeviceState(_:)

Gets the quick switch state of the current device.

Declaration

func getDeviceState(_ completionHandler: @escaping  @Sendable (CTQuickSwitchState, (any Error)?) -> Void)
var deviceState: CTQuickSwitchState { get async throws }

Parameters

  • completionHandler:

    A completion handler the framework calls after processing the request. The parameters passed to the completion handler indicate the Ctquickswitchstate and an error value that indicates whether the request succeeded, failed, or ended in an unknown state.

See Also

Checking the state of a device