Instance Property

isLowPowerModeEnabled

A Boolean indicating whether Low Power Mode is enabled on an iOS device.

Declaration

var isLowPowerModeEnabled: Bool { get }

Discussion

Users who wish to prolong their iPhone’s battery life can enable Low Power Mode under Settings > Battery. In Low Power Mode, iOS conserves battery life by enacting certain energy-saving measures, such as reducing CPU and GPU performance, reducing screen brightness, and pausing discretionary and background activities. Your app can query the lowPowerModeEnabled property at any time to determine whether Low Power Mode is active.

Your app can also register to receive notifications when the power state (Low Power Mode is enabled or disabled) of an iOS device changes. To register for power state notifications, send the message addObserver(_:selector:name:object:) to the default notification center of your app (an instance of NotificationCenter). Pass it a selector to call and a notification name of NSProcessInfoPowerStateDidChange. Once your app is notified of a power state change, it should then query isLowPowerModeEnabled to determine the current power state. If Low Power Mode is active, then your app can take appropriate steps to reduce activity. Otherwise, it can resume normal operations.

For additional information, see React to Low Power Mode on iPhones in Energy Efficiency Guide for iOS Apps.

See Also

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software