If your iPhone comes into contact with water or another liquid, resist the urge to panic while the liquid saturates the internal components. Instead, follow these simple steps in order to prevent lasting damage:
Remove your iPhone from the liquid and power off your device. Due to their conductive natures, water and other liquids short-circuit electronics. Do not power on your iPhone, charge it, or connect it to other devices without proper time to dry.
Dry your iPhone with a soft, absorbent cloth and carefully wipe down the headphone jack and charge port. If your iPhone is a GSM/AT&T model, remove and dry the SIM card and tray. Evaporating liquid with a heat source causes additional damage and is not recommended.
Lay your phone in a safe, dry place. Allow at least 48 hours for the liquid to evaporate before reinserting the SIM components or turning on the iPhone.
Placing your iPhone in a plastic bag filled with uncooked rice facilitates the evaporation process. Dry rice grains act as a safe, natural alternative to other desiccants, such as silica gel, and absorb excess liquid while being too large to enter ports or separations in the phone body.
While your iPhone dries, review the terms of your warranty. Liquid damage voids your manufacturer's warranty, as well as any additional AppleCare coverage. However, third party warranty vendors such as Asurion and SquareTrade offer coverage for accidental drops, spills, and submersion. If you own one of these warranties, file a claim to replace your equipment, regardless of whether the phone currently seems to be in good operating condition.
If your iPhone becomes submerged in liquids other than fresh water seawater, treated pool water, coffee, soda, juice then you may need to take additional measures to preserve functionality. When these other liquids evaporate, they leave behind residues that continue to damage internal components. If your warranty does not cover liquid damage and you have no other recourse for repairing or replacing your phone, consider re-submerging your iPhone in circuit-safe cleaner or pure grain alcohol. Pure grain alcohol absorbs water, cleans corrosive impurities, and evaporates without leaving behind a conductive residue. After removing your iPhone from the alcohol bath, allow a 48-hour drying period before powering on the device.