Download Paused when Mac is Locked

I have a project that download a big mass of Files from a certain Secure website through an HTTPSecureSocket.
Everything goes ok, but I realize that When my Mac is locked or Screensaver appears, my Queue get paused. And when I exit the screensaver or active the screen
Again resume the Download Queue.

Is It normal?, Someone here has faced with this?
In case that this is Normal, Is there a way to avoid that and download when the Mac is locked?


Sure sounds like AppNap is making your app stop downloading in this case
What happens if you turn power nap off (see ?
If it keeps downloading with the screen saver running then you probably need to register for AppNap and tell the system NOT to nap your application

OOOO, I seee.

So I can Enable PowerNap on my System Preferences, Cuz my Hackintosh detects as MacPro (Early 2008) So this feature will not available

You can disable it using NSProcessInfoMBS class and the. BeginActivity method.


Direct link

Or the free code from Sam

[quote=323992:@Norman Palardy]Or the free code from Sam[/quote]

NSProcessInfo is 32bit. Is there a 64bit version?

The NSProcessInfo class in Foundation framework is available in 64Bit.
And so is NSProcessMBS in my plugins.

I have newer code which I’m using in a 64-Bit project, let me clean it up and share it. I’ve redesigned how it works to make it much simpler.

Two things:

  1. There was a conversation earlier (later last year) where it appears that Apple have changed/broken how App Nap functions, which means that your application naps once the screen saver kicks in, regardless of the settings.
  2. I would actually recommend placing the download functions in a helper background application and by default non-gui applications did (this may have changed) not participate in App Nap, and should still function normally.

So I cleaned up the code and posted it here:

I believe that this should give you what you want.

redBull = new caffeineDrip redbull.reason = "App Nap Test" redbull.allowIdleSystemSleep = false redbull.displaySleepDisabled = true redbull.start


  1. Stopping the system from sleeping is the only way I am aware of to allow a GUI application to continue working. Use a console application otherwise.
  2. It has been confirmed in some 10.13 builds that the OS ignores these settings and will allow the system to sleep and will nap your application. I don’t know which builds and if this bug has been fixed, nor do I know if a console application will help here.