As soon as possible, you need to follow these steps. This will ensure you do not damage the device even further.
Get The iPhone Dried Fast
If your iPhone accidentally takes a swim, get it out of the water as fast as you can and check it out. Occasionally, if you’re lucky, your iPhone will work, or at least still partially work. Next, dry your wet iPhone with a towel, as much as you can, and try any one of the following.
Turn Your iPhone Off
Leave it turned off for 48-72 hours so it can air dry and not get fried by being turned on with water in the circuits. Put the iPhone somewhere warm and well ventilated, but not too hot or you’ll do even more damage to your phone. And, don’t turn it on for the duration of up to seventy two hours or the drying effect will be ruined. For some people, this works, other times, not so much.
Remove the Battery and Sim
As soon as you get iPhone out of water, remove it’s battery and also remove SIM card, removing battery will ensure that there is no short circuit happens inside the phone because of water as current keeps flowing even if it is turned off.
Removing SIM will save your sim from any damage however normally SIM does not get damaged by getting wet.
Try putting the phone in the refrigerator. This may sound strange because most of us associate heat with the drying process. Actually the refrigerator cools things by drawing moisture out of things. Do not put the phone in the freezer as this can damage the LCD. After 30 minutes or so, take it out for about 10 minutes, and repeat until the phone is dry.
2)Fixing It Using Rice
The easiest, but least effective way to fix water damage. This one is easy, and you can complete it in less than 10 minutes. Disassemble the iPhone, and put each section into a zip-lock bag filled with uncooked raw white rice, and place in a fridge. Let them sit there for about 48 hours. Remove and reassemble, turn it on
3)Fixing it Using Alcohol (DO NOT GET ETHYLENE ALCOHOL - IT WILL WRECK YOUR LCD SCREEN BEYOND REPAIR)
The area where you will do this needs to be clean. Don't do it in your dads work shop or garage, because dust is a mighty fine iPhone killer. Find a nice COLD area, like a bathroom, because Isopropyl alcohol evaporates fast at room temperature. I don't think I need to say, to wait a few hours after the last person who showered because of the moisture.
Dab the cloth in the alcohol, dabbing it along the circuitry board of the iPhone, hereby known as the logic board. Don't go in swipes or circles, because that can cause your cloth to tear, giving small fibers a chance to leave themselves behind. You don't want to use a lot of alcohol here, enough to make it appear wet, but not enough so as if you were to tilt the iPhone that it would drip off. Go over the entire phone surface, LCD screen and all. It is safe to use Isopropyl on LCD screens. Ethyl alcohol will dissolve the screen.
Bring the iPhone out to room temperature, and let it sit for about an hour or two. Don't attempt to speed things up with a blow dryer or by putting it in the sun, because that will just cause more problems. Plus the alcohol is highly flammable, and there is no quick fix for melted logic boards.
Reconnect everything once there is no visible signs of alcohol remaining, and see if the phone turns on. If it does not turn on, disassemble again and read on.
How to Get it Repaired
If all these methods fail, Apple is your best bet. Bring it to a Apple store and they can exchange it for you if it is still under warranty. Although if these sensors went off , than that will break your warranty as it counts as physical damage.
Here is the pink sensor on top left of phone. It is very subtle, but notice the pink color in the hole on the iPhone on the right compared to the one on the left.
If your sensors are pink and your iPhone is not working even after you've tried to dry it using the steps above, then you may want to consider sending it to a repair shop.