These alerts can appear for a few reasons: Your iOS device might have a dirty or damaged charging port, your charging accessory is defective, damaged, or non Apple-certified, or your USB charger isn't designed to charge devices. Follow these steps: Remove any debris from the charging port on the bottom of your device. Clean USB charger.
To be safe, back up your iPhone or iPad to your computer or the cloud. Power it off, and with a normal toothpick, gently remove the lint. You will be amazed how much can get stuck in the port. Connect the charger and see if it works