Disable App Nap on macOS?


It would be very helpful if there was support in JUCE for disabling/enabling the macOS App Nap feature that causes background applications to be suspended. Many audio applications would benefit from being able to turn this off from code.



It’s actually a just a plist entry.
NSAppSleepDisabled -> YES


Looks possible from PList entry yes, but it seems even more elegant to control it dynamically from code if possible (starting and ending activities that require App Nap to be disabled).