A third-party library provides a function I need to call every 100ms. Setting up a timer to do that works very well as long as my app is on foreground. When my app is on background timer works for a while but after a about a minute timer is called only after 10 second delay. The same happened when I created a separate thread with usleep-function. Is there any way I can keep timer running while my app is on background?
OS X Cocoa timer not fired when application on background
1.8k views Asked by superg At
2
Use beginActivityWithOptions:reason: to disable app nap for your application.