objective c - How can I get info about iPhone/iPad battery in iOS 10? -
how can battery cycles count , wear rate or @ least max capacity, app accepted?
this how battery level
[uidevice currentdevice].batterylevel
this how battery state
uidevicebatterystate currentstate = [uidevice currentdevice].batterystate;
this enum of uidevicebatterystate
typedef ns_enum(nsinteger, uidevicebatterystate) { uidevicebatterystateunknown, uidevicebatterystateunplugged, // on battery, discharging uidevicebatterystatecharging, // plugged in, less 100% uidevicebatterystatefull, // plugged in, @ 100% } __tvos_prohibited;
Comments
Post a Comment