Quick answer
How long can an iPhone stay in water?
Short answer
The ratings say 30 minutes at the tested depth: 1 metre for IP67 phones like the XR, 2 metres for the iPhone 11, 6 metres for the iPhone 12 onwards. That is a lab test with clean still water on a brand new phone. In real life, get it out immediately, switch it off, wipe it, tap the ports downwards and leave it to dry for at least a day before charging. Salt water, soapy water and hot water do more damage than the depth suggests.
Gadgets in this answer
Keep learning