batteryStateDidChangeNotification
A notification that posts when battery state changes.
Declaration
nonisolated class let batteryStateDidChangeNotification: NSNotification.NameMentioned 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.