Request raw battery data from the system.
- macOS 10.0+
- Mac Catalyst 13.0+Beta
The master port obtained from IOMasterPort(). Just pass MACH_PORT_NULL.
A CFArray of CFDictionaries containing raw battery data.
Returns kIOReturnSuccess or an error condition if request failed.
WARNING! IOPMCoyBatteryInfo is unsupported on ALL Intel CPU based systems. For PPC CPU based systems, it remains not recommended. For almost all purposes, developers should use the richer IOPowerSources API (with change notifications) instead of using IOPMCopyBatteryInfo. Keys to decipher IOPMCopyBatteryInfo's return CFArray exist in IOPM.h.