Prevents the system from sleeping automatically due to a lack of user activity.


#define kIOPMAssertionTypePreventUserIdleSystemSleep


When asserted and set to level kIOPMAssertionLevelOn, will prevent the system from sleeping due to a period of idle user activity.

The display may dim and idle sleep while kIOPMAssertionTypePreventUserIdleSystemSleep is enabled, but the system may not idle sleep.

The system may still sleep for lid close, Apple menu, low battery, or other sleep reasons.

This assertion does not put the system into Dark Wake.

A caller publish the AssertionType in its assertion properties dictionary. The AssertionType should be a key in the properties dictionary, with a value of a CFNumber containing the kCFNumberIntegerType value kIOPMAssertionLevelOff or kIOPMAssertionLevelOn.

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