Occasionally iTunes might display you the message "iTunes cannot read the contents of the iPhone. Go to the Summary tab in iPhone preferences and click Restore to restore this iPhone to factory settings", especially when you have a jailbroken iPhone/iPad/iPod.
Why would this happen? A big reason is that you have played around with some CYDIA apps, most notably the apps which try to modify the contents of iTunes Database File and corrupts the iTunesDB and iTunesCDB files.
To fix this problem, of course you can factory reset your iPhone and expect to lose any personal data not in your backup. Or you could use the following solutions, which will not put you in the risk of losing any data.
As you've already acknowledged that iTunes cannot read the contents of the iPhone 7/7 Plus/6s/6s Plus/6 Plus/6 or other iOS models because the iTunesDB and iTunesCDB files are corrupted, there are two ways to fix it.
Tenorshare TunesCare is a free iTunes repair tool with which you can fix the corrupted iTunes/iPhone Library (iTunesDB and iTunesCDB files) with ease. No need to restore your iPhone and this method is totally free.
Install this tool to your PC, and connect iOS device to computer with USB cable.
You can click Fix iTunes Sync Prolems option to start repairing corrupted iTunes library. It takes you around 15 seconds.
After this, you can check to see whether your iOS device is shown in iTunes. If still not, you can click Fix All iTunes Issues to fix the issue. This advanced repair can resolve more iTunes issues.
You can also fix iTunes not recognized your device by deleting the corrupted files. This method is more complicated.
If the above is too complicated, and you don't know how to properly use WinSCP and Cyberduck, I highly recommend you to use Tenorshare TunesCare to fix your iTunes issue, or you can use Tenorshare iCareFone to view all the contents on iPhone in iOS 10/9/8. Just like iTunes, the Tenorshare iCareFone can be used as iTunes alternative to help you tranfer data to/from computer, backup&restore iOS data, and even more, it can clean up iPhone junk files, fix all iOS stuck and repair iOS system without restoring.