Using Swift to disable sleep/screen saver for OSX
<p><strong>I'm looking for a way to disable sleep mode and screensaver through my application using Swift.</strong> I know this <a href="https://stackoverflow.com/questions/5126953/how-to-disable-the-screen-saver-display-sleep-on-mac">question</a> has <a href="https://stackoverflow.com/questions/8460033/what-is-the-correct-way-to-prevent-sleep-on-os-x">been</a> asked <a href="https://stackoverflow.com/questions/5596319/how-to-programmatically-prevent-a-mac-from-going-to-sleep">before</a>, but none of the answers are current (at least for Swift; I don't know about Objective-C).</p>

<p>I originally thought to use <code>NSWorkspace.sharedWorkspace().extendPowerOffBy(requested: Int)</code>, but according to <a href="https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWorkspace_Class/#//apple_ref/occ/instm/NSWorkspace/extendPowerOffBy:" rel="noreferrer">Apple's documentation</a>, it is currently unimplemented.</p>

<p>Any suggestions?</p>