Instance Property


The battery state for the device.


var batteryState: UIDevice.BatteryState { get }


The value for batteryState is one of the constants in UIDevice.BatteryState.

If battery monitoring is not enabled, the value of this property is UIDevice.BatteryState.unknown.

See Also

Getting the Device Battery State

var batteryLevel: Float

The battery charge level for the device.

var isBatteryMonitoringEnabled: Bool

A Boolean value indicating whether battery monitoring is enabled (true) or not (false).

enum UIDevice.BatteryState

The battery power state of the device.