We were receiving complaints from several users that they would lose the connection to their published applications when working on their Mac OS X devices. When working on these devices their published applications would suddenly be disconnected. The users would receive the following message:
The app wakes up automatically when the user brings the app to the foreground or when the app receives a Mach message or Apple event. The documentation goes on to describe the coding the developer needs to employ to opt out of having his application be subject to App Nap's invocation, adding Note: If you experience problems with App Nap, you. The “defaults” command would need to be executed on the user’s Mac that runs your app. Therefore, if that command works at all, you’d have to issue it in code from your app when it starts. Since this is an app preference, using macoslib, calling CFPreferences.Value(“NSAppSleepDisabled”)=true should do it.
App Nap is a feature introduced in OS X 10.9 Mavericks and has helped to boost battery life for portable Macs as well as reduce power consumption for the non-portable variety. While the feature is pretty great, sometimes App Nap can mess with your apps and put them to sleep when you don’t want them to be. OS X Mavericks App Nap App Nap puts applications that you’re not using into a special low-power state that regulates their CPU usage as well as network and disk I/O. App Nap can be automati-cally triggered if an app’s windows are not visible and the app is not playing audio.
While investigating the issue and some Googling by my colleague Patrick de Ritter we found that we where not alone. Beside the small note Dan Brinkman already wrote about this issue there is also a nice thread about the issue on the Citrix Discussions forum. To clarify this issue I decided to write an article about this issue.
The issue the users are experiencing seemed to be caused by a new feature in OSX 10.9 called app nap. It is a sort hibernation mode for applications and causes the above described effect for users. To prevent this from happening we took the following steps:
defaults write com.citrix.Receiver.nomas NSAppSleepDisabled –bool TRUE
defaults write com.citrix.XenAppViewer NSAppSleepDisabled –bool TRUE /best-app-to-clean-mac.html.
After the settings have been changed the user won’t experience disconnected sessions, caused by a hibernating application anymore. Remember the user needs to re-login before the changed settings will be effective
Please note: We tested this against Apple OS X 10.9
We were receiving complaints from several users that they would lose the connection to their published applications when working on their Mac OS X devices. When working on these devices their published applications would suddenly be disconnected. The users would receive the following message:
While investigating the issue and some Googling by my colleague Patrick de Ritter we found that we where not alone. Beside the small note Dan Brinkman already wrote about this issue there is also a nice thread about the issue on the Citrix Discussions forum. To clarify this issue I decided to write an article about this issue.
The issue the users are experiencing seemed to be caused by a new feature in OSX 10.9 called app nap. It is a sort hibernation mode for applications and causes the above described effect for users. To prevent this from happening we took the following steps:
defaults write com.citrix.Receiver.nomas NSAppSleepDisabled –bool TRUE
defaults write com.citrix.XenAppViewer NSAppSleepDisabled –bool TRUE
After the settings have been changed the user won’t experience disconnected sessions, caused by a hibernating application anymore. Remember the user needs to re-login before the changed settings will be effective
Please note: We tested this against Apple OS X 10.9