Nathanael Carper Nathanael Carper - 1 year ago 106
Swift Question

Disable App Nap

I really need to disable App Nap in my OS X application in Swift but I've looked all over the web and can't find an answer. Any help would be appreciated.

Answer Source

Try this:

let myQueue = NSOperationQueue()
let myActivity = NSProcessInfo.processInfo().beginActivityWithOptions(
    reason: "Batch processing files")
        // Perform batch processing of files here

Read more about App Nap on Apples reference site here.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download