That message comes up everytime u get water in there. In normal temperature water will usually evaporate on its own within two hours.
When moisture gathers in the charging port then the contact point gets damage and it stops the phone to charge and the damage will be long term.
How to get rid of water in charging port. Tap your iphone gently against your hand with the lightning connector facing down to remove excess liquid. This is because if you live a humid area then moisture in air damages the charging port. Dry the phone by gently shaking it.
This is normally enough to get rid of water or moisture in the port. I work in a very dusty paper mill and i ll get a moisture warning when the charging port gets dirty. Then blow it out with canned air if you can.
If any liquid other than fresh water enters the charging port of your device you must rinse it in fresh water and dry it thoroughly with a dry soft cloth. Press down onto the port and hold the straw steady. Water will naturally evaporate from the charging port within approximately 1 to 2 hours.
Assuming you can see some traces of liquid in it you can also speed things up and get a small piece of tissue paper and insert it into the port. Just leave the charging port for 1 to 2 hours where it will evaporate and people can charge it like they used to. Let the moisture dry out naturally.
After at least 30 minutes try charging with a lightning cable or connecting a lightning accessory. Use a wireless charger. In normal temperature water will usually evaporate on its own within two hours.
Take a plastic or rubber toothpick wrap it with tissue paper or thin cotton cloth and move it gently inside the usb port to wipe the moisture. Blow air into the charger port in 1 to 2 second bursts. Press down on the nozzle for 1 to 2 seconds to blow air into the port while holding the straw steady.
This is normally enough to get rid of water or moisture in the port. You could have dirty contacts in the charging port. In fact several users have reported that their phone is not water damage but still they face moisture issues.
Use 90 isopropyl alcohol or electronic parts cleaner and a toothbrush to clean the port. Just let the phone sit awhile and try to get rid of water from ports by shaking the phone towards that end. Position the straw to the left or right side of the charging port.
Leave your iphone in a dry area with some airflow. Dry the phone by gently shaking it. You can also try to rinse the charging port with distilled water alcohol or petrol and then wipe it using paper towel strips.