Can I display iPhone Battery in the Touch Bar?

Hi guys,
Is there any way to show the current charging status of an iPhone or other devices in the Touch Bar?
Thanks

Or maybe through the code of this GitHub Project:

Didn't test it though!

Final Edit: with Batteries this should be possible.

1 Like

Ok, I check them out and found the first option seems to be too complicated, and it needs to install something into my Terminal, which I'm not comfortable with it. And the second option didn't work at all for me.
And the final version seems to be great, but I'm not sure if I would pay for it. At least I can test it for 14 days.
Thanks

Finally, I was able to get this to work with libimobiledevice installed via Homebrew. It does work over Wifi.

set deviceBattery to (do shell script "/usr/local/bin/ideviceinfo -n -u PHONE_UUID -q com.apple.mobile.battery | grep "Capacity" | awk '{print $2}'")

return "iPhone" & return & deviceBattery & "%"

That seems to works how I wanted it. But how did you do that?
Can you do a step by step follow up for me so I can do it with mine too?
Thanks

First you will need to ensure the proper libraries are installed. I recommend using Homebrew (https://brew.sh) if you don't already have it installed. Once it is installed, run 'brew install libimobiledevice' (without the quotes) in Terminal.

From there check out the following website for libimobiledevice (https://libimobiledevice.org). You will need to pair the phone with libimobiledevice over a usb connection first. Once it is paired then you should be able to copy and past my provided AppleScript from previous post into a widget in BTT. You will need to change where it says PHONE_UUID to the actual UUID for your phone. You will see this number in the output once you pair your phone with libimobiledevice. It is a long string of numbers and characters. Good luck! Feel free to DM if you need some help.. I am not an expert but will do my best

Hi,
I just did everything in the terminal and thought that's it. But realized that it needs to be connected the phone via USB to libimobiledevice. But I don't get it. Is that an app? What is the libimobiledevice for, and what is it doing? Do I have to use that at all?

Ok, I think I will stay with the Batteries app, mentioned by @Caliguvara. I'm comfortable with messing around with the terminal. So I just removed Homebrew and libimobiledevice.
But thank you anyway.

Imprint | Privacy Policy