Sunday, January 04, 2009

Using your own address book in the iPhone Simulator

Jailbroken iPhone with openssh:

scp mobile@iPhone:~/Library/AddressBook/* ~/Library/Application\ Support/iPhone\ Simulator/User/Library/AddressBook

Non-jailbroken iPhone:

Say bye bye to John Appleseed & Co.

8 comments:

Erwin Hogeweg said...

I copied the addressbook over from my iPod, but the files are overwritten as soon as I fire up the AddressBook in the Simulator (SDK3.0). It appears to reset the addressbook no matter what. Even if I manually add a couple of entries.

Any suggestions?

Kind Regards,

Erwin

insightguy said...

I'd guess the format is different or something. This worked great for me using the address book on my 10.6 machine and the last non-beta release of the simulator.

Thanks 0xced!

Anonymous said...

Hi,
Your instructions helped a lot. Thanks. But with newer iOS there is a folder for each version. For example for 4.1 the destination path becomes:
~/Library/Application\ Support/iPhone\ Simulator/4.1/Library/AddressBook/AddressBook.sqlitedb

jaime said...

This doesn't work on a non jailbroken device. I tried playing around with it, taking in existing suggestions. There is no .mdinfo to copy.

Chris Gummer said...

Thanks for this - worked a treat! Just needed to copy the sqlites DBs to the version specific simulator directory.

Anonymous said...

This worked fine until I upgraded to xcode3.2.4. Had it working in ios4.0 simulator by changing the directory. Seems like the backup doesn't have .mdinfo files anymore.

Frederic Barthelemy said...

Do you have an update to your script that supports the newer Backup layouts?

For reference: they now don't have file extensions, and there are 3000 ish files in my backup folder, I really have no clue how to rapidly detect which file is the addressbook so that I can copy it into place.

Suggestions?

Gia said...

I liked your blog thanks for sharing this.