iTunes(如iTunes)在OS X(Cocoa)上的iPhone电池百分比 [英] iPhone Battery Percentage on OS X (Cocoa) like iTunes

查看:109
本文介绍了iTunes(如iTunes)在OS X(Cocoa)上的iPhone电池百分比的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在OS X的Cocoa中找到一个SDK或其他任何东西,这些东西可以检测到何时连接了iPhone,并且可以像显示iTunes一样显示iPhone的电池电量,它可以向您显示手机已充电了多少(小电池图标).因此,如果有人可以告诉我是否有这样的事情,我先谢谢您.(顺便说一句,这必须适用于OS X)

I'm trying to find a SDK or anything in Cocoa for OS X that will detect when an iPhone is connected and will show the battery percentage of the iPhone just like iTunes where it shows you how much your phone is charged (the little battery icon). So if anyone can tell me if there is something like this i thank you in advance. (BTW this has to be for OS X)

推荐答案

看看 https://bitbucket.org/tristero/mobiledeviceaccess 具体来说,getMobileGestaltValue:使用键BatteryCurrentCapacity这将为您提供所需的数值-显示它是另一个问题.

Have a look at https://bitbucket.org/tristero/mobiledeviceaccess Specifically, getMobileGestaltValue: using the key BatteryCurrentCapacity That will give you the numeric value you want - displaying it is a different issue.

https://bitbucket.org/tristero/ipodaccessframework 是一个框架应用程序,显示了如何监控用于正在连接的iDevice ...

https://bitbucket.org/tristero/ipodaccessframework is a skeleton application that shows how to monitor for iDevices being connected...

实际上, https://bitbucket.org/tristero/ipodbattery 正是您想要的.

In fact, https://bitbucket.org/tristero/ipodbattery is exactly what you want.

这篇关于iTunes(如iTunes)在OS X(Cocoa)上的iPhone电池百分比的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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