So your iPhone has got wet. You dropped it, what, in the bath? The sea? When trying to take underwater photos? And now you want to dry it out, fix the water damage, and recover the data inside? Well, you've come to the right place.

It's a sad fact that iPhones and iPads (but particularly iPhones) get dropped and damaged all the time. Probably the most common is the smashed screen, which we discuss in our article on getting Apple to replace your broken iPhone. But the second most common is almost certainly water damage.

Cheer up, however, because a quick dunk in the old H20 isn't necessarily a death sentence for an iPhone. We can't guarantee anything, but your phone may survive to fight (and get dunked) another day. In this article we explain the best strategies for dealing with a water-damaged electronic device.

External drying

External drying

First things first. Get the iPhone out of the water right away, if you haven't already. And don't even think about plugging it in.

If the waterlogged iPhone is plugged in already, unplug it (very carefully). Don't be tempted to turn it on and check for damage, as this can cause short circuits.

If the wet iPhone is in a case, remove it; take the SIM card out too. (Removing the battery wouldn't hurt either, but this is obviously only for confident DIY-type users who are willing to void the warranty.) These steps help to reduce the number of nooks and crannies where water can linger, and help to avoid damage to key iPhone components.

Wipe the excess and exterior liquid off everything you can reach. Turn the iPhone upside down and give it a gentle shake to clear the ports and sockets.

Power off

Power off

What you want to avoid is activating the circuits inside the iPhone, because this is likely to lead to short circuits - that's what causes the long-term damage. If the iPhone happens to be switched off, leave it off.

Don't be tempted to power it up and see if it still works. It might, and then promptly stop working forever precisely because you took a look.

A more likely scenario, sadly, is that your iPhone was switched on (or in sleep mode) when you dropped it in the drink.

So at this point you're looking at two unappealing options: power down (but in the process causing the screen and operating system to wake up briefly before switching off) or leave the device in sleep mode in the hope that you don't get any notifications.

It's your decision, but after discussions here in the Macworld offices we've decided that the lesser of two evils is to wake the iPhone briefly in order to do a full power off - and that's what we suggest in the video at the top of this article.

If you were lucky enough to be in Airplane Mode when you dropped the device, however, or are otherwise confident that nothing will happen to make your iPhone wake up in the next 48 hours, leaving it alone might be the better option.

Dry out your iPhone with uncooked rice

Dry out your iPhone with uncooked rice

Now we need to draw as much interior liquid out as possible. Resist the temptation to use a hair dryer or other heat treatment, as this can damage the iPhone's internal components.

(A few iPhone users advise the use of a non-heated fan, mind you, which at least shouldn't make things worse, even if we think the below techniques are likely to be more effective.)

To get moisture out of the iPhone's interior, you need a desiccant. Many people swear by uncooked rice, advising owners to put their damp iPad or iPhone in a big bowl of the stuff (cover it completely) and leave it there for 48 hours or so.

The rice will absorb the moisture effectively, and most of us have some uncooked rice in our homes (or can get hold of some fairly easily). But it may get dust or even entire grains into the ports. Be warned.

We discuss this method in more detail in our article: rescue a soaked iPhone with the rice trick.

Photo by Steven Depolo; used (unmodified) under Creative Commons Licence. It's an iPod touch, in fact, but you get the idea.

A better option: dry out your iPhone with silica gel sachets

A better option: dry out your iPhone with silica gel sachets

A better option than uncooked rice if you've got it is silica gel - those little (and inedible) packets that come with some electronic components, particularly if they've been shipped from a country with a humid climate.

You need enough of them to cover the iPad/iPhone. You may be able to buy them en-masse from a craft shop, and handbag shops are a great source - ask the staff if they mind you fishing out the sachet that you'll probably find zipped into each handbag's interior pocket.

Silica gel sachets should dry a wet iPhone out more efficiently and less messily than rice. You should still give the iPhone at least 48 hours to dry out completely, however.

Dismantling your iPhone or iPad

Dismantling your iPhone or iPad

If you're really confident about doing DIY repairs on your iPhone, the best approach to a wet iPhone is to unscrew the bottom screws (on most models of iPhone this will require a proprietary type of screwdriver head, available as part of some iPhone repair kits sold by unofficial third-party accessory makers) and access the interior.

Just bear in mind that this is likely to invalidate any warranty coverage you've got, and there's a risk that your DIY work will cause damage rather than repair it.

Still: the most effective way to get water from the inside of an iPhone is to get right in there and dry it out from within.

You'll want to take the battery out, for instance (this also minimises the potential for short circuits), and get water out of all the internal nooks and crannies. Apply a soft dry cloth to all interior surfaces while endeavouring to be as gentle as possible.

We're not sure we'd recommend this approach, primarily because of its potential to exacerbate the problem. But in some situations it may be the only way to save the day - and if nothing else works and you're out of warranty, you may find yourself with nothing to lose.

What to do next

What to do next

Once you've waited a couple of days and think you've successfully dried out your iPhone, you can try switching it on. If it still doesn't work, or if you want to get the internals checked out, you can ask an Apple Genius to take a look, but bear in mind that iOS devices have internal liquid detectors, so there's no point pretending the device went wrong of its own accord. They will know.

One final warning: a bad submersion may cause long-term damage, particularly to the battery, that only becomes apparent months later. In one famous case, an iPhone 3GS spontaneously overheated more than a year after being dropped in a pool. The owner had used the rice technique and the iPhone had worked fine afterwards... initially.

We would therefore advise that, if you're lucky enough to be able to get your iPhone to run after a dip, you should back up all important files on the device in case it packs up again in the future. Its recovery, we're sorry to say, may only be temporary - although we hope not.

Avoid a repeat with waterproof cases, wrist straps and emergency kits

Avoid a repeat with waterproof cases, wrist straps and emergency kits

Hopefully the steps above helped you revive the drowned iPhone in your life, but are there steps to help us avoid the situation in future? Yes, there are.

Water's not good for iPhones and iPads, penetrating deep within their circuitry and leading to damaging short circuits. So those (extremely common) hazards so many iPhone owners risk - taking photos on the beach, browsing the web in the bath, even reading email on the loo - are best avoided. Most of us only cotton on to the dangers after our first soaked iPhone.

If you really want to read e-books by the pool or in the bath, consider buying a waterproof case for your iPhone or iPad

Another option to bear in mind is some kind of handle or wrist strap so that you're less likely to drop the device in the first place.

You might like to buy an emergency package for drying out an electronic device - obviously it's best to have it ready in advance, instead of waiting for the crisis to occur and then queueing at the shops.

The cheapest options we've seen (but not tried) are the Dry Pack and Automated Facilities Tech Rescue Mobile Phone Emergency Dry Out Kit, both on Amazon.

Kensington's EVAP is a much more expensive option (especially considering that it's effectively a slightly slicker version of the silica gel trick above) but one we can vouch for.

Buy an iPhone 7 or iPhone 7 Plus

Buy an iPhone 7 or iPhone 7 Plus

If buying a waterproof case doesn't appeal to you, then maybe the iPhone 7 range might. Why? The iPhone 7 and iPhone 7 Plus have been designed to be water-resistant with a rating of IP67, meaning they should both survive submerged in up to 1m of water for 30 minutes.

This should mean that (for a large number of users at least) water-damaged iPhones will become a thing of the past, although taking it deeper than 1m or keeping it submerged for longer than half an hour might still cause problems.

You can buy the iPhone 7 handsets on Apple's website; or browse the best iPhone deals here.

How to eject water from an iPhone 7 speaker

How to eject water from an iPhone 7 speaker

While the iPhone 7 series is water-resistant, it doesn't stop water from getting into the speaker grille. The Apple Watch Series 2 has a similar issue, although it comes with a built-in feature that can be toggled to 'eject' the water by playing a specific frequency.

Why the iPhone 7 and 7 Plus don't feature a similar option, we're not quite sure, but there is a relatively easy way for users to eject water from within an iPhone 7 or 7 Plus speaker, and it's by using a free app called Sonic

Sonic can play back any sine wave tone from 0Hz to 25,000Hz (although you may not be able to hear the high end) and while it wasn't designed specifically for water ejection in mind, it can help.

Simply download the app, adjust the frequency to around 165Hz (it's hard to get it exactly, but anything between 160-170 should be okay) then tap "Play".

This should cause the water to 'jump' from the speaker and while it won't eject it to the same level as the Apple Watch, it should be enough for you to be able to dab it with a tissue to absorb it.