Some time ago I wrote a program called iox, which is similar to ioreg, except that it is easier for me to translate to IOKit calls. When I run this on my laptop, I see the following with the battery level.
AppleSmartBattery - IOService:/AppleACPIPlatformExpert/SMB0/AppleECSMBusController/AppleSmartBatteryManager/AppleSmartBattery CurrentCapacity = 11678 FullyCharged = YES DesignCapacity = 13000 MaxCapacity = 11910 ...
In code, i.e.
IOServiceNameMatching( "AppleSmartBattery" );
I have no idea if the name will be the same for iOS, but I would either try to find a program like ioreg that you can run on iPhone, or write something simple to register the equivalent.
ioreg is part of IOKitTools and it should just compile on the iPhone.
Edit:
CFMutableDictionaryRef matching , properties = NULL; io_registry_entry_t entry = 0; matching = IOServiceMatching( "IOPMPowerSource" );
Add some security checks. When you figure out the properties you need, you can get them directly, rather than using IORegistryEntryCreateCFProperties to get them all at once.
IOKit presents everything as a big tree. IOPMPowerSource cannot directly have the required attributes, in which case you will need to go through the child elements. Using something like ioreg, you can tell you what you are looking for before you start coding.
source share