ProcessInfo.PowerStateDidChangeMessage
A message the system sends when the device’s power state changes.
Declaration
struct PowerStateDidChangeMessageOverview
After your observer receives this notification, query the isLowPowerModeEnabled property to determine the current power state of the device. If Low Power Mode is active, take appropriate steps to reduce activity in your app. Otherwise, your app can resume normal operations.
Observe this message with the identifier powerStateDidChange, or specify its type directly to the addObserver(of:for:using:) method. The Subject of this message type is ProcessInfo.
This message interoperates with the notification NSProcessInfoPowerStateDidChange. The system notifies observers of the message when the NotificationCenter posts the notification. Similarly, the system notifies observers of the notification when it posts the message.