问题描述
应用程序商店中目前有应用程序(因此不需要越狱)告诉您:
您 iPhone 上电池电量的准确百分比值.一世已经尝试过苹果官方的
当 [UIDevice] 提供的有关电池运行状况的信息如此之少,而且几乎没有提供有关电池运行状况和性能的信息时,这些应用程序如何获得如此多的有关电池运行状况的详细信息.
解决方案此类应用很可能使用 IOKit 框架,该框架在 OS X 上是公开的,但在 iOS 上是私有的(Apple 不允许在 App Store 中使用私有框架)应用程序,尽管有时在审核过程中可能会被忽略).
您可以在此处查看示例项目.
There are currently apps in the app-store (so it does not require jailbreak) that tell you :
Exact percentage value of battery level you have on your iPhone. Ihave tried Apple's official Code Sample, although it tells you when your iPhone is charging and discharging but it gives me values in 5% steps. How do these apps get exact values of battery percentage?
Applications like Battery Health show
- Current Maximum Capacity vs Manufacturer's Capacity
- Current Discharge Rate
- Lifetime Battery Cycle Count
The same application also gives information about the Charging Rate in Watts when the phone is charging (check images) and current Charger's Power Rating.
How do these applications get so much detail about battery health when [UIDevice] provides so little information about it and almost no information on battery health and performance.
解决方案It is likely that such apps use IOKit framework, which is public on OS X but private on iOS (it's not allowed by Apple to use private frameworks for App Store apps, although sometimes it can be overlooked during the review).
You can see a sample project here.
这篇关于在 iOS 上获取电池健康信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!