01-23-2014 09:40 AM
Does anyone have any ideas how to defeat the new Mavericks App Nap feature? http://www.apple.com/osx/advanced-technologies/ I have an application that can't go to sleep on the job.
It is easy enough to disable it on my own machine using the "Prevent App Nap" checkbox in Get Info on a given *.app executable. What I need to do is disable it for stand-alone executable installed on customer Macs. Checking the checkbox on my computer before distributing it to other computer is not good enough--Maverick resets the checkbox whenever the *.app is copied to another Mac. I have searched for a info.plist key to do the job, but I haven't been able to find one.
I'm trying to avoid giving customers instructions for disabling App Nap. Any ideas on how to disable the feature for deployed apps? Or is there anything I can put in the app (short of generating sound) that would defeat it?
Thanks.
01-24-2014 11:24 AM
I would look into using the System Exec VI and sending the following command:
defaults write <app domain name> NSAppSleepDisabled -bool YES
This should programmatically disable the App Nap feature in Mavericks. I used this as a reference for the command.
01-24-2014 11:37 AM
I have not moved to Mavericks yet, but thank you for the information and the link.
Lynn
07-26-2015 03:05 PM
@djDannyK wrote:
I would look into using the System Exec VI and sending the following command:
defaults write <app domain name> NSAppSleepDisabled -bool YES
This should programmatically disable the App Nap feature in Mavericks. I used this as a reference for the command.
Not sure abou that refernce I think it is the wrong domain. The preference needs to be set in Launch Services and is persistent between reboots if done correctly. After setting the check box you can use the command
"defaults read com.apple.launchservices"
to see what it sets. There is a long data string to identify (fingerprint) the application, but there is a key for LSAppNapIsDisabled and the first term is "com.ni.labview". So if you have multiple versions of LV on your system you will have many entries with differnet fingerprint strings.
This is the same for Yosemite.