Gently tap your iPhone with the connector facing down to remove excess liquid.

Leave your iPhone in a dry place with some airflow for at least 30 minutes 

Try charging it with a Lightning or USB-C cable. If the alert persists, there’s still liquid in the connector. 

Leave your iPhone in a dry area with airflow for up to a day. It may take up to 24 hours to fully dry. 

If it still won’t charge, unplug the cable from the adapter and reconnect them. If all else fails, consider a new phone.