How to Sync your iPhone to a new Mac without Erasing your Data (a complete step-by-step guide)

My Macbook Pro hard-drive failed recently.  It was only about a year and a half old and it just went down without warning.  No slowing of the system, no problems, no crashes.  It just died suddenly. 

Anyway, I had Apple Care so I got it fixed for free with a shiny new HD.  However, I lost all my settings including the data relating to my iPhone to iTunes sync.  I spent the last 3 months trying to get my iPhone and the new HD to talk to each other.  But every single thing I tried didn’t stop me getting the unbelievably irritating message:

iphone erase and restore

But my persistence has finally paid off and I have actually successfully synced my iPhone to my new HD.  And, I have of course beaten (and beaten deep into the ground) the stupid stupid annoying irritating erase and sync message. This fills me with a sense of pride and accomplishment.

While I was trying and failing to fix the problem I read many many different solutions and also many different ideas about which software to use and so on.  I also read countless times that it was not fixable and that I had to erase my iPhone.  Or that I had to jailbreak it.  In any case I did not find one clear cohesive step by step to solving this problem.

So I would like to share my solution in the hope that it will help other people get themselves out of this ridiculous situation.  This is my own complete and extremely detailed step by step guide to syncing an iPhone with a second/new Mac without losing/deleting/erasing any data. 

This solution does not require jailbreaking or anything of that nature, nor does it require you to erase anything from your iPhone.

And yes, this is EXACTLY what I did to get my iPhone to sync with my new HD and iTunes.


I would just like to mention that I am using Snow Leopard with iTunes 10.7 (I downgraded from horrible iTunes 11 – if you want to downgrade read my post here). 

This guide does not require jailbreaking or anything of that nature, nor does it require you to erase anything from your iPhone.

Also, I have not used any programs you have to pay for. 

This guide uses only freeware or shareware.

And finally, I would also like to link these two sites as the most helpful of the plethora of web information I looked at.  Thank you for your help.



A little background reading on why your Apple device won’t sync with multiple computers…

The reason you cannot sync to multiple computers is because Apple creates a special ID called a Library Persistent ID, which is unique to your iPhone and the first iTunes you sync with. Every time you try to sync with a different Mac, your Apple device checks to see if it has a matching ID, and if not refuses to sync without erasing.

Now this is all very well in terms of piracy and so on, but in legitimate cases like mine, where I was not the one at fault (yes, it was all your fault Apple, even the people at the Apple Store agreed that it was nothing that I had done and purely a mechanical faliure!), it is extremely unfair that I should have to erase my iPhone (and yes, if you choose to erase it will remove anything you personally have added to the phone – contacts, photos, music, apps, videos, pics, everything!) just because I have a new HD (legitimately provided by Apple) and a new iTunes (also from Apple).

Anyway, what it boils down to, in essence, is that you need to acquire the original Library Persistent ID, which is written in your iPhone, and force your new iTunes to accept that original ID instead of the new ID it came with.




Step 0: Before we start…

Before starting it is best to be prepared for all possible eventualities. 

Therefore, I recommend you back up your iTunes folder, which I usually do by making a copy of the iTunes folder on my desktop.  The iTunes folder is located in your Music folder: 

User > Music > iTunes

Ensure that iTunes is NOT set to sync devices automatically.
To do this go to the iTunes Preferences and under the Devices tab tick the box that says:

Prevent iPods, iPhones and iPads syncing automatically

devices menu

Make sure you do this BEFORE you connect your phone.



What you will need…

1.)  iTunes.  I don’t know if the version of iTunes you are running will make a difference, but I am running 10.7.

2.)  UltraEdit.  This is software which will allow you to read and edit the iTunes Music Library.xml file (more on this later). 

You can download UltraEdit here.

3.)  Your iPhone and its USB cable, and of course your Mac.


I have received a comment that this also works for Windows 7, so this method may also work for other Windows users.

4.)  Access to this site (mentioned above):



Step 1. Back up

We need to create an iPhone backup in order to acquire your Library Persistent ID. This also means that if something goes wrong you will at least have a partial backup to restore from. It’s a real relief that it’s possible to backup some things on your device without syncing. 

If you want to do a backup of your photos just in case see my post on some ways to do this.


1.)  Start iTunes.

2.)  Connect your iPhone so that it shows up in the lefthand column under Devices.  (This is in iTunes 10.7.  I am not sure if this is the same in other versions.)

3.)  Click on your iPhone.

4.)  Under the Summary tab scroll down to Backup and click the option

Back up to this computer

1.5.backup settings

You need to back up to your computer and NOT to iCloud or anywhere else.  Ensure that you DO NOT clickEncrypt local backup” as this defeats the object.

5.)  Right click on your iPhone (where it is listed under Devices on the lefthand side).  This will bring up the menu.

2.device menu

6.)  Choose the “Back up” option.


This may take a little while depending on what you have on your iPhone.

You can also backup your Apps by right clicking on your device and choosing:

Transfer Purchases from “—————-’s iPhone”

5.transfer purchases

You will have to verify this using your Apple ID password which is the same one as you use to buy things in the App Store.

Depending what you have this may take time and also space on your computer.

When you have finished backing up, close iTunes and make sure iTunes doesn’t continue to run in the background.  You should also disconnect your iPhone just in case.



Step 2. Locate your files

There are several files you will need for the next few steps. Firstly:

iTunes Music Library.xml

iTunes Library.itl

These are both located in your iTunes folder which is, as mentioned earlier,

Users > “Your Home Directory” > Music > iTunes


This is a file which is created during your backup. To find it go to:

Users > “Your Home Directory” > Library > Application Support > MobileSync > Backup

In the Backup folder you will find another folder which has an unintelligible jumble of letters and numbers for a name. Inside this folder you will find the Info.plist file.



Step 3. Acquire your Library Persistent ID

If you are a code whizz it is probably possible to find the ID yourself.  However, for the rest of us mere mortals the best way to do it is to get help from this site (which I mentioned earlier).

6.upload plist

Just locate and upload your Info.plist file and in return you get your Library Persistent ID (a string of 16 jumbled letters and numbers). 

It is as easy at that. 

Make a note of your ID (I advise copying and pasting it into a text document for ease of use) for the next step.



Step 4. Edit your iTunes Music Library.xml file

★★Ensure that iTunes is not running in the background★★

1.)  Install UltraEdit.  (Double click the downloaded dmg file and drag the icon into your Applications folder.)

2.)  Start UltraEdit and close the popup window asking if you want to buy UltraEdit (unless you want to buy it.  Apparently it is a very good program for code editing and such.)

7.ultraedit trial

3.)  In UltraEdit, open the iTunes Music Library.xml file we located earlier.

4.)  Locate the line which says:

<key>Library Persistent ID</key><string>****************</string>

This 16 letter and number jumble is your current Library Persistent ID

8.itunes library xml edited

5.)  Delete this current ID, then copy and paste in your original Library Persistent ID which you just acquired from your Info.plist file.

6.)  Save your edited iTunes Music Library.xml file and close UltraEdit.



Step 5. Tricking iTunes into accepting your original ID

All the changes are now in place. 

However, if we leave the current iTunes Library.itl file in the iTunes folder, iTunes will look at the itl file and override what we’ve done, changing the ID back to the new one. 

iTunes must think that the iTunes Library.itl file has been damaged or corrupted before it will accept the changes we made to the iTunes Music Library.xml file.

So to complete the process…

1.)  Open TextEdit (or any text editor of your choice).

2.)  Save the blank text file as a Rich Text File callediTunes Library”.  Save this to your Desktop.

9.Text edit

3.)  Rename the file iTunes Library.itl”

It will ask you:

Are you sure you want to change the extension from “.rtf” to “.itl”?

Click use .itl.

10.use .itl

4.)  Open your iTunes folder and rename your current iTunes Library.itl file to something different and move it somewhere safe.  I renamed my current file “iTunes backup” and moved it to my Album Artwork folder, as I wanted the original file to be easy to restore if the process didn’t work.

11.itl backup

5.)  Once you have removed the current iTunes Library.itl file, drag the blank iTunes Library.itl file you just created into your iTunes folder.



Step 6. And Finally…

All the changes are now complete. 

★★At this point I urge you again to make sure your iPhone is not connected and that you have made various backups as I advised before starting. 

I did not have any problems with data loss when I did this but it is always good to be safe.★★

So finally…

1.)  Start iTunes.

iTunes will look at the blank iTunes Library.itl file (that we created previously) and think it is corrupt.

Because it thinks the file is corrupt, iTunes will then try to recreate your library data using the iTunes Music Library.xml file we modified.

If you have a very large library this will take a very long time. 

Mine is about 15 GB and took about 10-15 minutes but then I don’t really have any album art work or videos and other non music files.  It probably also depends how much information you have about each track (artists, albums, ratings etc.) and of course how fast your computer is.

Just leave it to do its own thing, go have a beverage of your choice, and come back when it has finished.

You should find that your iTunes looks exactly the same as before (at least mine did).

★★At this point, to avoid accidents, check that the automatic sync option is still disabled in the iTunes Preferences★★

2.)  Now connect your iPhone.

All the steps are now complete and you should be able to sync your iPhone (or iPod or whatever iDevice it is) with iTunes.

Phew! What a long process. But that’s it!

I hope this works for you.


A few extra notes you may find useful…

NOTE 1. Testing the sync…

I think the safest thing to do (once you have completed all the steps above) is to test the iPhone sync by trying to sync something you can restore easily.

For example, I only have a few non Apple tones in my iPhone so I synced the Tones to check it was working.

I only had one problem, which was with an app which said it could not be synced and asked if I wanted to remove it and sync. So I just said yes because it was a free app anyway and I figured one app was a small price to pay for fully functioning iPhone to Mac sync.


NOTE 2. Purchased items…

You may also get this message:

sync warning

But I just click Transfer every time and everything seems to work out just fine.


NOTE 3. A quick word about my Contact sync…

The first thing I did when I finally got my iPhone to sync properly with my Mac was to sync all my Contacts back to my Mac. 

Now I am not 100% sure if this has anything to do with it but I created a fake contact in my Mac Address Book (because it was empty) and my sync went absolutely perfectly.  The fake contact is now in my iPhone and all my iPhone contacts are backed up to my Mac. 

I imagine that you do not actually need to do this, but if anyone has problems this worked perfectly for me.



I think this should work for Windows as well but I cannot test it as I do not have a functioning Windows system that will support iTunes 10. The locations will be different of course but the fundamental principle should be the same.

★★ Update ★★

As mentioned above, I have confirmation that this method does indeed work in Windows 7.  Thanks go out to the anonymous commentor who confirmed this!  Much obliged o(^∇^)o

★★ Update ★★

I have received a comment saying that this method works for the newest OS X (currently Yosemite), the newest iTunes (currently 12) and also for the iPhone 6.  Many thanks to filzer for the useful info!

Categories: Free Software, iPhone, Mac, Mac & OS X, Macbook Pro | Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 27 Comments

Post navigation

27 thoughts on “How to Sync your iPhone to a new Mac without Erasing your Data (a complete step-by-step guide)

  1. Shan

    Reina, I don’t know if you’ll ever read this, but thank you so much for this! I had been afraid to delete my iPhone settings that I’ve had since 2010. I basically have gone through an iPhone 4 and iPhone 5 that were still synced to a very slow MacBook I no longer use. Today was the day I decided I have to figure this ridiculous thing out and it worked perfectly. So thank you again for this very useful article. I can finally manage my music and videos on my PC that I actually use everyday, not the ancient MacBook, haha.

    • I’m so glad this helped you! Positive feedback is always much appreciated. Thank you for taking the time to post here (^-^)/

  2. jbob2


    Not sure what has happened here but I followed all the steps and yet when I opened iTunes again, there was no difference at all. It was like the changes hadn’t been saved although i’m certain they were. Any thoughts?

    • Do you mean no difference as in your iTunes still won’t sync with your iPhone/iPod?
      If it is just the visual aspects of iTunes, those shouldn’t change – iTunes should look exactly the same as before the process…
      If the former, have you checked your current iTunes Library.itl? If the Library Persistent ID hasn’t changed then your changes have not been saved.

  3. Snaleks

    IT WORKED, I finally found someone on the inter web that could help me. By the way I did half the process yesterday and finished it today but meanwhile I had a workflow that turned on iTunes as a alarm, so iTunes was on while I inserted the blank file and moved the real iTunes library so in other words iTunes caught me redhanded and it wouldn’t work, the damage was easily undone by deleting the blank file and creating a new one and whilst moving the real iTunes Library to another safe location. I did this in Yosemite as well.
    Thank you so much for the great help 🙂

    • It’s always good to hear this post has helped someone! Thanks for taking the time to comment (^-^)


  5. filzer

    just to let you know: i did this successfully with Yosemite, iTunes 12 and an iPhone6 – I transferred this ID now for years on different computers with windows and Mac OS X. Never had too much trouble.
    Great trick, great How-To! Thanks!

    • Hey there, thank you for taking the time to comment. Positive feedback is always much appreciated (^-^)
      Also thanks for the info! Good to know this still works on newer iPhones and OS X versions.

  6. samplenickname


  7. Donna

    Hi, I hope all is well with you! As for me, I am going insane. I have the Macbook Pro 13 inch retina. For the life of me I can’t find that Mobile Sync folder outlined in step 2 that contains the info.plist 😦 Ideas?

    I tried to unhide all hidden folders just to make sure but it’s still not listed under Application Support.

    I am losing my mind!

    • Hey, I’m good thank you for asking (^-^)

      I can’t say for sure but have you done an unencrypted backup to your Mac? (You can see how to do one in Step One.) The Mobile Sync folder is not a default OS X folder and is only created when you back up your iDevice to your Mac. Even if you have done one before perhaps try doing a manual backup (i.e. not one which involves automatic syncing or icloud) and see if the folder is created?
      Mobile Sync isn’t usually a hidden folder, although I have not used Mountain Lion or Mavericks so I can’t rule out the possibility that this has changed in later OS Xs. Even if this is the case you should still be able to find the folder by going to

      Finder > Go > Go to Folder

      This will do a system search for your user so as long as you are logged in as the user that did the backup this search should find it.

      Let me know how it goes (^-^)b

      • umero

        i can’t find the folder info.plist too..i search info.plist in the ‘go to folder’ in finder but it says the folder can’t be found..pls help me…i’m using the latest iTunes and OS X

      • Hey,
        So I have done some digging and it turns out that in Mavericks (and possibly other OS Xs) it seems to be slightly trickier to access your Mobile Sync folder. Perhaps try this:
        1. Go to folder as shown.
        2. Type or copy and paste the following
        ~/Library/Application Support/MobileSync
        It should take you straight to the correct place.
        Hope this helps. Good Luck (^-^)

      • umero

        Thanks..i have successfully sync my iPhone with the new iTunes on my new macbook i am planning to do the same with my iPad with the same i just follow the same procedure? tq in advance.

      • I do not own an iPad so I am not sure but I have received comments saying that this method works for iPods so I assume it will work for any iOS device.
        Please let me know if this works for you. Good luck! (^-^)b

  8. Anonymoss

    Just chiming in in the New Year: I was able to follow these instructions with a hand-me-down iPhone 4 and iTunes 11 on Windows 7
    Your guide was a fantastic alternative to the countless threads that offered “backup and restore and hope for the best”, “don’t worry and trust that iTunes won’t wipe everything out” or even just “nope, you’re SOL buddy”.
    Hats off to you for putting together something that is not only unambiguous, but also works like a charm!

    • Hey there!
      It’s really interesting to know that this works in Windows too. Yes, I’ve been there with the unhelpful threads… luckily there are some useful blogs around 😉
      Thanks for taking the time to leave a comment. I’m glad I could help (^-^)

  9. Anonymous

    very well done!

  10. everything went swimmingly until the last step! i got this pop up when I opened iTunes: “the file “iTunes Library.itl” does not appear to be a valid iTunes library file. iTunes has attempted to recover your ITunes library and renamed this file “iTunes library damaged”
    any advice??

    • just adding to that it just recovered my old itunes data!

      • As you probably found out, the whole “the file “iTunes Library.itl” does not appear to be a valid iTunes library file…” extravaganza is the bit where iTunes looks at the fake .itl file, thinks the file is corrupt, and rebuilds it using the modified xml file.

      • It didn’t end up working 😦 I don’t know what happened but I managed to sync it and only lose my songs which are easily replaced! Phew

      • I’m glad you didn’t lose anything essential. It’s definitely a good thing to have backups of things.

        I wonder why the songs did not sync… I have an iPod so I don’t have any songs on my phone, but my photos, apps and contacts didn’t have problems syncing.

        Still, good to hear that you managed to sync in the end.

Leave a Reply to Anonymous Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at