Remember when water and iPhones could not be mixed? Pools, tubs and toilets would suck down the functioning iPhones by clumsy and sloppy owners and spit out expensive paper paths as if they were nothing. Times have changed, and the newest iPhones can take a dip without fear of some death. But a dip in water can still cause sound-damping music and sound from the speakers.
Enter shortcuts. Introduced in iOS 12, shortcuts allow both developers and general users to patch up simple complex tasks for iPhones to be processed. The best part? Shortcuts can be uploaded to the internet and shared with everyone with an iPhone running iOS 12 with the shortcut app installed. And it just happens to be a good one to eject water from an iPhone speaker.
To be clear, not all new iPhones are created equally. While iPhone X S and X S Max is IP68 waterproof, iPhone X, X R 8, 8 Plus, 7 and 7 Plus are all IP67. While the latter are still preferred for older iPhone models when it comes to water protection, it really doesn't correspond to waterproof. IP68 is actually not technically "waterproof" either, just better protected than IP67. Because of this, we urge users to deliberately knock their iPhones underwater, as water damage is not covered by Apple's warranty.
What is shortcut?
While there is likely to be more than one shortcut to addressing this problem, which seems to have captured the love of the internet, Josh0678 was created. This shortcut works like the water ejection tool at Apple Watches, plays a very bassy tone for about ten seconds, and shakes water both from the speaker and from the device.
Step 1: Install Shortcut  To download shortcut, go to the following link on your iPhone, which opens the shortcut program with the shortcuts that appear. Press "Download Shortcut" and then open the "Library" tab where you should see "Water Output" warmly welcomed at the bottom of the list.
One of the best parts about shortcuts is that you can quickly access them from different locations. For example, you can access this shortcut from the shortcut application, from the Widget shortcuts, using Hey Siri or from a home page icon. The first option is quite obvious, and I'm sure you already know how to add the shortcuts to your Today View for easy access from the lock screen.
As for Hey Siri, you want to force (on 3D Touch devices) or tap the ellipse (•••) on the shortcut "Water Output" on the "Library" tab on shortcuts. Then press the "Settings" icon and select "Add to Siri". Then press the red recording button and say your Siri phrase or press "Type phrase" and enter it if you have Type to Siri enabled. Turn "Done" three times to return to the "Library" tab.
To add a shortcut to the Home screen to eject water, return to the shortcut Settings page, but select "Add to Home Screen" this time. This gives you easy access to creating a home page icon for it, just as you would when creating a homepage for a web page in Safari.
Step 3: Flush out water from your iPhone
Now all that's left to do is use your new shortcut. Touch "Water Output" from the "Library" view in shortcuts, and then press "Start Water Exhaust" at the prompt. To get the "Start Water Exhaust" prompt, you can also press "Water Release" in the widget, use Hey Siri with your selected Siri phrase or tap the icon on the home screen if you did one.
When the water ejection begins, you hear a sharp pop, followed quickly by the bassy tone. If you really have water in your speaker, make sure it is leaking or spraying out of the bottom of your iPhone. We recommend that you keep your iPhone at a certain angle with your speaker closer to the floor, as it can help you force the water out of your speaker better.
What should you expect to look like on your iPhone speaker? Take a look at the Slo-Mo GIF below for an example of how well this shortcut works.
As you can see, the shortcut breaks a pretty good job that emits water from your iPhone's speakers. However, it is definitely not perfect and will leave some residues in the speaker after the tone has stopped playing. While you can continue to use the shortcut until you feel that all of the water is gone, we do not recommend doing it – the tone seems quite intense and there is no way to know if prolonged use is bad for your iPhone's speaker or not.  Our advice? Use it only when needed, then put the rest with a towel and wait for it to dry out. If your iPhone is IP68 or IP67 resistant, it should be able to take care of itself with some time.
This shortcut is not the only way to get water out of your iPhone's speakers. If you would rather go through a solution available in the App Store, check out the Sonic app. It relies on a similar strategy as "Eject Water", but unlike shortcuts, Apple's stringent standards passed over its iOS marketplace.
More information: Use this app to get water from your iPhone speaker