How to get real time battery level on iOS with a 1% granularity

后端 未结 7 1724
清酒与你
清酒与你 2020-12-05 03:19

I\'m using this function to get current battery level of device:

[[UIDevice currentDevice] setBatteryMonitoringEnabled:YES];
UIDevice *myDevice = [UIDevice c         


        
7条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-05 04:02

    You can find a perfect answer here

    Xcode: 11.4 Swift: 5.2

    Click Here

提交回复
热议问题