← Back to context

Comment by krackers

2 days ago

> application can prevent sleep _when you close the lid_

Ordinarily it can't, it's not possible to set a IOPMAssertion that prevents sleep on lid close. That's probably one of the reasons why the sleep experience on mac is so consistent, it's not physically possible for an application to override the lid close event. (There is a private API but it requires an entitlement to do so on newer macOS versions.) That said there are always legacy APIs and bugs.