I have a new iPhone. I wanted to make it play a certain sound when it was fully charged or charged to a certain percentage.
Here is how you can set your iPhone to play a sound when plugged in, battery level is reached or most any thing else in iOS.

I try my best to follow the 80/30 rule for battery charging.
Todays batteries don’t like to be fully charged, fully drained, or plugged in all the time.
So the current thinking is your battery will have a longer life (years of use, not daily use) if you keep it within 80% and 30% charged.

I found some YouTube videos but no articles. So here is an article to follow.
Thanks to Brandon Butch – https://www.youtube.com/watch?v=TCvrghCk1mY&t=1s and
Tech Tips Central – https://www.youtube.com/watch?v=p3u5J4X–ww for the tutorials.

Its very complicated and may take you a couple of tries to get it right.

* Jump to the next section for a shortcut that will do the first 3/4 of this for you. But here is the full process if you like..

>Copy the sound file you want to play while in Files
>Open Shortcuts
>Select Automation at the bottom of the screen
>Start a new Automation with the + in the upper right corner
>Create Personal Automation
>Find the battery option (or what ever trigger you want) at the bottom of the list. – Battery Level
>Refine you trigger – Rises Above 80% I choose this because I only want it to play when charged up, not when draining below 80. It would play both times if you choose Equals option.
>Hit Next in the upper right corner
>hit +Add Action
>Search for “Encode”, then choose Base64 Encode
> Select Input.
>leave app open and go back into Files and copy your file to clipboard again.
> now back in the Automation screen Choose Clipboard
>Back out and just Search “Copy to Clipboard” * no +Add needed.
> Tap Play button
>Tap share at bottom of the code
>Copy – Next – Done
>Go back in to the Automation
>Tap on Do
>Add
>Search for and choose “Text”
>Paste the code into the field box
>Hit Done
>+Add – Search for “Decode”, select Encode base 64, select Encode and change to Decode
>Play
>Back out and hit Done
>Go back into the Automation
>Tap on Do
>Add – search – “play sound”
>Tap Play
>back out Save or done
>go back
>Set ask before running slider to off. Confirm.
Finally you are done


One of the YouTube videos had an Apple Shortcut that makes this much faster.
* Be careful what you download !
You will need to turn off a security setting in Shortcuts to allow non-Apple shortcut downloads.
– Settings> Shortcuts > Set Allow Untrusted Shortcuts to on.
The post was up for some time before I did it and there were no complaints so I did it. You can look at the shortcut to see what it will do before you run it.
Get this from the Brandon Butch tutorial – EncodetoBase64 Shortcut https://bit.ly/3mHtxy1

> Put the sound you want to play in your Files folder
>Run the EncodetoBase64 Shortcut from My Shortcuts
>Select the sound file and it will show you the sound file in text form
>Share and Copy
>Go into Automations
>Start a new Automation with the + in the upper right corner
>Create Personal Automation
>Find the battery option (or what ever trigger you want) in the list
>+ Add Action
>Search “text “
>Past into the field
>+ Add action
>Search “encode” (or decode or base64) and choose Base64Encode.
*this action is what the Shortcut we started with was based on.
> Select the word Encode and change it to Decode
>+ Add action
>Search and select for “Play Sound”
>You can hit the Play button at the bottom to confirm the sound.
>Hit Next if needed to get to the final screen
>Set ask before running slider to off. Confirm.
You are done

I’m using clips from He-Man “I have the power” when my battery raises above 80% and Star Wars “Your powers are weak old man” for when it falls below 30%.

Posted by Ken Barker

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s