That's a temporary fix as well. Here's a permanent one:
This has bothered me since the beginning of the iOS7 betas and iTunes 11.1 and it has continued to plague me and thousands of iTunes users. I think I have finally nailed it.
Firstly there are two separate bugs: The "Waiting for sync to start" bug where you'll get stuck on this step. That one is simple. iTunes can't sync when your passcode is locked. Unlock your phone, and make sure it doesn't lock before you finish the sync. Stupid I know.
The second one was much much harder to nail down. The symptoms include: "ghost songs" on your phone that will stop new syncs, cause your iPhone to skip over them when playing/shuffling. And not having your phone sync new or all of your songs. The common denominator: When looking at your phone in iTunes there will be grey circles in front of a bunch of songs/media.
A million different temporary cures from logging in and out of the iTunes store on your phone and your iTunes; turning off 'Show all songs'; turning off iTunes Match; selecting your iTunes library in your music apps sharing options (obscure); turning on and off sync (the most common temporary cure); resetting your phone settings; restoring from backup or most destructively restoring from fresh, deleting all your data and settings. Yes, the equivalent of the good old nuke your PC and reinstall Windows option we've all derided for so long is now a common troubleshooting technique for your Apple device. Sheesh.
Have you tried all of the above already? Too scared to nuke your phone and start afresh? Grab a copy of iExplorer or PhoneView (the demo version will do) and follow these instructions:
MAKE SURE EVERYTHING IS BACKED UP TO BOTH YOUR LOCAL MACHINE AND ICLOUD.
Connect your iPhone to mac, open PhoneView, go to Settings>Show entire disk. Here I would recommend you back up all the contents of your phone. Or if using iExplore, open the media section.
Deleted the following folders:
- Purchases
- Downloads
- iTunes Control>Sync>Media,
- iTunes Control>Music
Deleted the following files from iTunes Control>iTunes:
- MediaLibrary.sqlitedb
- MediaLibrary.sqlitedb-shm
- MediaLibrary.sqlitedb-wal
You may get away with only deleting purchases, but just to be safe nuke them all.
Restart your phone by holding home and start buttons for five seconds.
Resync with iTunes (make sure you reset all the options for only syncing what you want, deleting these files makes iTunes think you want to sync everything).
This should (most likely) cure your ghost song troubles once and for all.
Credit to this obscure fix goes to an leeg330 on old thread I dug up on the Apple Discussion forums with people having issues with ghost songs on iOS5.