IOPSCopyPowerSourcesInfo not working

I have a M2, 13" MacBook Pro

import Cocoa
import IOKit
import Foundation

var blob = IOPSCopyPowerSourcesInfo() // cannot find 'IOPSCopyPowerSourcesInfo' in scope
Answered by DTS Engineer in 724601022

You need:

import IOKit.ps

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

You need:

import IOKit.ps

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

IOPSCopyPowerSourcesInfo not working
 
 
Q