Many mobile devices are water-resistant (some more than others), but they'll rarely tell you when there's a less-than-obvious danger. You might not find out that you've soaked something important until a gadget doesn't work. Apple appears to have a solution, though: recent betas for iOS 10 will serve a warning when there's liquid detected in your device's Lightning port. Ideally, this gives you time to pull an accessory (and dry out your gear) before there's any real damage.
So far, the feature is only known to work with newer iPhones like the 6s, 6s Plus and SE. We've reached out to Apple for confirmation of the feature and will let you know if it has something to say. With that said, it's not at all shocking that Apple would go this route. It's helpful to both the company and customers: you might rescue your device when there's a close call, while Apple spends less time and money on repairs.