How to Safeguard Your iPhone: Version 1.0 of the 'Water Eject' Script

Push water out of your iPhone's speaker just like built-in feature on Apple Watches!

How to Safeguard Your iPhone: Version 1.0 of the 'Water Eject' Script
Easily remove water from your phone speaker

Creating a Water Eject Shortcut with Jellycuts

One day, I was beating the heat and I accidentally spilled a glass of water near my phone. I soon noticed that some water got in my phone and I started worrying that I might cause damage. I knew that some devices, like the Apple Watch, have a built-in water eject feature, but the iPhone doesn’t. Time to fix this myself.

By creating this script, I now have a tool that can help me deal with this issue whenever it arises. It’s a small but meaningful way that coding has enhanced my life.

The Water Eject Script

import Shortcuts
#Color: blue, #Icon: waterdrop

# Ask the user if they want to start the Water Eject process
alert(alert: "You want to begin Water Eject?", title: "Water Eject", cancel: true)

# Make the phone vibrate 15 times to shake out water from the speaker
repeat(15){
	vibrate()
}

# Tell the user that the Water Eject process is done
alert(alert: "Water Eject Completed!", title: "Water Eject", cancel: false)

Jellycuts Water Eject Script

  1. Beginning the Process
# Ask the user if they want to start the Water Eject process
alert(alert: "You want to begin Water Eject?", title: "Water Eject", cancel: true)

Before the script starts vibrating your phone, it asks you if you really want to start the Water Eject process. This is important so that the script doesn't run by accident. You can also cancel it if you change your mind.

  1. Vibrating your Phone
# Make the phone vibrate 15 times to shake out water from the speaker
repeat(15){
	vibrate()
}

This is the main part of the script. The phone vibrates 15 times in a row, which helps shake out any water stuck in the speaker. You are able to customize the number of times it vibrates also!

  1. Displaying a Confirmation Message
# Tell the user that the Water Eject process is done
alert(alert: "Water Eject Completed!", title: "Water Eject", cancel: false)

Once the vibration part is done, the script shows you a message saying the Water Eject process is complete.

Conclusion

This Water Eject script is a simple example of what you can do with Jellycuts. By automating the vibration process, you can help protect your phone after it gets wet. You might have noticed that this is the first version of this shortcut, meaning that we need people like you to expand this Shortcut to greater heights. If you have any suggestions for improvement, please feel free to use the comment section below!

While my version 1.0 is basic, I’m inspired by Josh0678’s work and I am on the path to building something more advanced. With each update, I plan to add features, improve effectiveness, and create a more refined tool. You can check out his shortcut here: https://routinehub.co/shortcut/571/

Become a Jellycuts Member

Whether you're a developer or just want to streamline tasks, Jellycuts makes automating iOS workflows simple and powerful. A subscription gives you advanced features, exclusive scripts, and a community of creators. Transform your iPhone or iPad into a productivity tool. Subscribe now to simplify your life.›› Subscribe Today ‹‹