Apple's latest iPhones can resist water at a maximum depth of 6 meters for up to 30 minutes. However, there may be times when things can go wrong. If this happens and your iPhone starts showing a “liquid detected” warning, putting your device in rice is the last thing you should consider.
iPhone with rice is a dish that Apple does not recommend!
In a recent support document discovered by Macworld, Apple recommends not placing your wet iPhone in rice in hopes of drying it quickly. iPhones come with a built-in mechanism to warn users if there is liquid on the port or inside. The USB-C or Lightning port is temporarily disabled until the connector or accessory is dry.
If you browse the Internet looking for ways to save your wet iPhone, a common solution available is to put rice on it. Instead, Apple warns in the support document that you should not “put your iPhone in rice. Doing so may allow small particles of rice to damage your iPhone.”
The Cupertino giant also warns against “using an external heat source or compressed air” or inserting a foreign object into the connector, such as a paper towel or cotton swab. To dry your iPhone, Apple recommends that you “gently tap the iPhone against your hand with the connector facing down to remove excess liquid. Leave your iPhone in a dry area with some airflow.”
You should try charging your iPhone or turning on the accessory after waiting at least 30 minutes. In some cases, it may be necessary to leave the device for a longer period of time to dry it. Apple also recommends that you don't charge your device when it's wet, but you can turn your iPhone back on and ignore the warning if it's an emergency.