Step by step what I did to sync my iPhone from my PC to my Mac
0. Shutdown iTunes on both computers.
1. Downloaded
HexEdit from SourceForge for my Mac.
2. Opened iTunes Music Library.xml with Notepad on my PC.
3. Found the line saying <key>Library Persistent ID</key><string>A56C833FD2DF2A3E</string>
(Your 16-digit code will be different. This isn't my code either, I just made it up as an example.)
4. Opened iTunes Music Library.xml on my Mac
5. Found the same line in the file I did in step 3 and made a copy of the code (for later use)
6. Typed my PC's version of the code so the Mac file now matches. Save and close.
7. Used HexEdit to open the iTunes Library file on my Mac. (Don't be scared by all the stuff you'll see, you don't have to mess with any of it.)
8. In HexEdit, do a find replace. Make sure the Matching: Hex button is selected. Type the old Mac code you copied down into Find, and replace it with the new PC code.
9. Save and close.
10. Start iTunes on you Mac and wait for it to fully boot. (Might want to shut it down and open it again to make sure the changes take effect.)
11. Plug in your iPhone. Should show up in iTunes like it does on your PC.
Now, I did have one minor problem. The first time I plugged my phone into my Mac, the phone and iTunes seemed to jam for some reason. But I just unplugged it, and they both started working fine. Plugged the phone back in, and didn't have the issue. Then just synced my purchases (apps) from the phone to iTunes (that step took the longest time).