This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
guard case let batteryCenterHandle = dlopen("/System/Library/PrivateFrameworks/BatteryCenter.framework/BatteryCenter", RTLD_LAZY) where batteryCenterHandle != nil else { | |
fatalError("BatteryCenter not found") | |
} | |
guard let c = NSClassFromString("BCBatteryDeviceController") as? NSObjectProtocol else { | |
fatalError("BCBatteryDeviceController not found") | |
} |