Have you recently updated your iPhone to iOS 5.1.x or had to replace the hardware only to discover that Wi-Fi Sync no longer works? Well that is exactly what happened to me and I have found a solution.
There are multiple guide to do the basic troubleshooting or configuring iTunes Wi-Fi Sync including Apples steps located here: http://support.apple.com/kb/TS4062
If you followed those steps and it still does not work, here are the other options that have helped me fix the problem.
While iTunes is open and your iPhone is configured for Wi-Fi Sync, your iPhone “Sync Now” button is not greyed out (Settings > General > iTunes Wi-Fi Sync) but when you press the “Sync Now” button, it says something like looking for “<ComputerName>”, cannot find “<ComputerName>”, or Sync will resume when “<ComputerName>” is available.
There are a couple of additional steps that you can take that should clear this up prior to a trip to the genius bar:
- Reinstall the newest version of iTunes. Reboot your computer. Do not open iTunes. Then download the file from Apple (http://www.apple.com/itunes/download) and install* over the previous version. Follow the steps on how to setup Wi-Fi Sync (http://support.apple.com/kb/HT1386). Did this work for you? Great! If not, go to step two.
- Backup your iPhone and restore it to factory default (http://support.apple.com/kb/HT1766), then try again.
*Note for windows users, you might need to repeat option 1 but by uninstalling iTunes first then doing a fresh install. If you have a lot of data in iTunes, I would likely go to the genius bar before this option and then also backup the iTunes database before starting the uninstallation.
Managing iTunes library, for your reference:
iTunes: Back up your iTunes library by copying to an external hard drive.
iTunes: How to re-create your iTunes library and playlists
PS- This worked just fine for Jailbroken iPhones.