     
     // Allow the computer to go to sleep
     // Returns whether the power assertion was successful or not.
-    public func allowSleep() -> Bool {
+    @objc public func allowSleep() -> Bool {
         let sleepAssertionRelease = IOPMAssertionRelease(self.sleepAssertionID!)
         
         if sleepAssertionRelease == kIOReturnSuccess {

    
    // Prevent the computer going to sleep
    // Returns whether the power assertion was successful or not.
    public func preventSleep() -> Bool {
        self.sleepAssertion = IOPMAssertionCreateWithName(
            self.sleepAssertionType,
            IOPMAssertionLevel(kIOPMAssertionLevelOn),

    }
    
    // Can the computer go to sleep, or is it being prevented?
    @objc public func canSleep() -> Bool {
        // Check if the assertion already exists
        if sleepAssertion == kIOReturnSuccess {
            return false
