Omnis Technical Note TNID0008 Sept 2016

Omnis Studio OS X and App Nap

for Omnis Studio 6.1 or above
By Omnis Engineering

App Nap is a feature added in OS X Mavericks to allow applications to go into an energy saving mode and sleep when idle. This could be manually enabled/disabled by selecting an application and pressing Cmnd-I or File->Get Info to bring up the application Info pane and then toggling the "Prevent App Nap" checkbox. This checkbox is no longer supported in newer versions of OS X and Studio 8.

However, the installer for Studio 6.1 and later automatically disables the use of App Nap for the current user. This is achieved by adding a key setting to the /Users/<user>/Library/Preferences/com.omnis.OmnisStudio.plist file. By use of the following command :

defaults write -app "/.app" NSAppSleepDisabled -bool YES

Which translates for the default Omnis Studio 8.0.1 installation as :

defaults write -app "/Applications/Omnis Studio 8.0.1 x64.app" NSAppSleepDisabled -bool YES

Note that if you login as a different user, change the app bundle identifier (com.omnis.OmnisStudio) or move the bundle to another machine then this setting will no longer apply and Omnis Studio will go to sleep when idle.

If you are going to allow other logged in users access to Omnis Studio, then you can copy this file from the installed user to each of the users that require access.

If you change the app bundle identifier or have moved the bundle from another machine or disk then you need to ensure that you also copy or generate the appropriate ‘com......plist’ file in the users location.

If you want to re-enable App Nap issue the above command in a Terminal session and provide ‘NO’ as the value:

defaults write -app "/Applications/Omnis Studio 8.0.1 x64.app" NSAppSleepDisabled -bool NO

You must restart Omnis Studio before the change can take effect. If you have Xcode installed then you can also edit the property list file directly and change the value of the NSAppSleepDisabled key.