Instance Property


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


var isBatteryMonitoringEnabled: Bool { get set }


Enable battery monitoring if your app needs to be notified of changes to the battery state, or if you want to check the battery charge level.

The default value of this property is false, which:

  • Disables the posting of battery-related notifications

  • Disables the ability to read battery charge level and battery state

See Also

Getting the Device Battery State

var batteryLevel: Float

The battery charge level for the device.

var batteryState: UIDevice.BatteryState

The battery state for the device.

enum UIDevice.BatteryState

The battery power state of the device.