I am writing an application that receives OSC messages. However, due to 10.9\'s App-Nap-technology the application stops reacting on these messages after leaving foreground.
the activity need to be stored in a property. So I added this in the header-file:
@property (strong) id activity;
and then used this implementation.
if ([[NSProcessInfo processInfo] respondsToSelector:@selector(beginActivityWithOptions:reason:)]) {
self.activity = [[NSProcessInfo processInfo] beginActivityWithOptions:0x00FFFFFF reason:@"receiving OSC messages"];
}
Thanks to all contributors!
From your description of the problem it sounds like you might want to take a look at WWDC 2013 704 and review the section (near the end) on background continuous work. A look at the manual for the setpriority command may also be helpful. I haven't had a need to disable app nap but I think manual change of the process priority is a good approach.
2013 WWDC Video 205 (near the middle) describes some interesting aspects of app nap that can affect the outcome of whether the app is throttled. Video 209 from WWDC 2013 presents the following screenshots on Occlusion (the point where app nap engages) may be useful.
Hope this helps.