Contents

batteryStateDidChangeNotification

A notification that posts when battery state changes.

Declaration

nonisolated class let batteryStateDidChangeNotification: NSNotification.Name

Mentioned in

Discussion

For this notification to be sent, you must set the isBatteryMonitoringEnabled property to true.

You can obtain the battery state by getting the value of the batteryState property.

See Also

Managing notifications