Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Foundation
- import IOKit.pwr_mgt
- var assertionID : IOPMAssertionID = IOPMAssertionID(0)
- var description : CFString = "Cup of coffee" as CFString
- let success = IOPMAssertionDeclareUserActivity(description, kIOPMUserActiveLocal, &assertionID)
- if success == kIOReturnSuccess {
- // IOPMAssertionRelease(assertionID)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement