If your iPhone won’t connect to iTunes the easiest thing to do first is to make sure your iPhone is fully charged. When your iPhone is charged, restart both your computer and your iPhone. Before connecting your iPhone back to your computer, make sure your firewall or security software is updated and has the proper settings that will allow your iPhone to show up on your computer, or temporarily disable it to make sure it is not causing the connection issue for your iPhone to iTunes.

If your iPhone still isn’t showing up after you’ve charged it, restarted your computer and iPhone and have made sure your computer’s security will allow the connection, check the USB connections. It could be that you have to plug your iPhone directly into your computer instead of through the keyboard. Or, try a different USB port to see if your iPhone will show up.

If worse comes to worse, you might have to uninstall iTunes and then reinstall it, but check for updates first and make sure your computer is running the latest version of iTunes. If it is, and your iPhone won’t connect, then uninstalling it and reinstalling it might help correct whatever issues are causing the iPhone to not show up. If your iPhone still won’t connect to iTunes, you should contact Apple Support.

Source Apple Support