是否可以使用私有API在iOS 10+中获取iPhone充电器的信息? [英] Is there a way to get iPhone charger's information in iOS 10+ using private API?

查看:101
本文介绍了是否可以使用私有API在iOS 10+中获取iPhone充电器的信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾经在iOS上使用过名为Battery Life的应用,我相信它使用的是 https://github.com /eldade/UIDeviceListener 作为检索充电器信息的方法(如瓦数,电压和幅度).但是,此应用已从App Store中撤出,并替换为不具有该功能的新版本,UIDeviceListener上有一条注释,说它不再在iOS 10+中运行.

I used to use an app called Battery Life on iOS which I believe was using https://github.com/eldade/UIDeviceListener as a method to retrieve the charger's information (as in the wattage amount, voltage, and amplitude). However, that app has since been pulled from App Store and was replaced with a new version without that functionality, and UIDeviceListener has a note saying that it's no longer working in iOS 10+.

现在,我目前有一部使用Qi充电器充电的iPhone X,我很好奇Qi充电器向iPhone提供的瓦数.我知道,对于USB充电,我可以轻松地放置一个USB功率计,我可以得到想要的数字,但是因为这是一个感应充电器,我觉得我必须在设备本身上对其进行测试.

Now, I currently have an iPhone X that I charge with Qi charger, and I'm just curious about how much wattage does my Qi charger supplies to my iPhone. I know that for a USB charging I could easily put a USB wattage meter and I could get the number that I want, but because this is an induction charger I feel like I have to test it on the device itself.

是否有人找到了可以提供类似于UIDeviceListener所报告的信息(IOKit?)的信息的API?我打算只将其侧面加载到我的手机中,因此使用私有API不会成为问题.

Has anybody found a API that would provide this information similar to what UIDeviceListener was reporting (IOKit?)? I'm planning to just side load it to my phone, so using private API wouldn't be an issue.

谢谢.

推荐答案

看来您可以按照建议使用私有API IOKit来做到这一点.

It seems you can do it with the private API IOKit as you suggested.

我找到了这个项目: https://github.com/ethan605/ios-battery-统计

它很旧,所以可能需要一些修改

It's old, so it might need some modifications

我发现了最近的一个: https://github.com/eldade/EEIOKitListener

Edit : I found this one, much more recent : https://github.com/eldade/EEIOKitListener

这篇关于是否可以使用私有API在iOS 10+中获取iPhone充电器的信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆