cake_wallet/ios/CakeWallet/wakeLock.swift

21 lines
323 B
Swift
Raw Normal View History

2022-01-21 13:02:00 +00:00
//
// wakeLock.swift
// Runner
//
// Created by Godwin Asuquo on 1/21/22.
//
import Foundation
import UIKit
2022-01-24 15:21:52 +00:00
func enableWakeScreen() -> Bool{
2022-01-21 13:02:00 +00:00
UIApplication.shared.isIdleTimerDisabled = true
2022-01-24 15:21:52 +00:00
return true
2022-01-21 13:02:00 +00:00
}
2022-01-24 15:21:52 +00:00
func disableWakeScreen() -> Bool{
2022-01-21 13:02:00 +00:00
UIApplication.shared.isIdleTimerDisabled = false
2022-01-24 15:21:52 +00:00
return true
2022-01-21 13:02:00 +00:00
}