How can I get battery data

Hello, i work on app which need to get a lot of metrics about app. I want to get the same data wich been analyze by "instruments" but i want to create an app which get this data automatically. I want a lot of data about battery. How can i get this data ?


Thank you

Replies

See https://developer.apple.com/documentation/uikit/uidevice/1620042-batterylevel - as noted there "Before accessing this property, ensure that battery monitoring is enabled."


Don't expect 'a lot of data'/fine grain info.