views:

1117

answers:

4

Anyone know how to repopulate my Simlator's AddressBook with Johnny Appleseed, etc? Or, my own data. Doesn't matter.. It's just that it's somehow empty now and useless for testing.

A: 

Have you tried resetting the firmware? Theres an option in the menu somewhere.

Daniel A. White
Just did and that didn't help!?!
Meltemi
Why don't you add your own data.
Daniel A. White
well, that's part of my question... how?
Meltemi
ah, i see. using the one of the 4 apps in Simulator: Contacts. didn't think of that. thx
Meltemi
+3  A: 

Mine goes missing every so often. No rhyme or reason around it.

I back up a copy of /Users/[your user name/Library/Application Support/iPhone Simulator/User/Library/AddressBook/AddressBook.* to a safe place and copy it back when it goes missing.

This is also a good strategy to have multiple address books for testing.

Jeff Schilling
+1  A: 

Choosing "Reset Content and Settings" from the iPhone Simulator menu sounds good, but it's exactly how you accidentally delete your default contacts.

After doing so the User directory will be in your trash. As Jeff Schilling above mentioned, you can just put it back in your /Users/[your user name]/Library/Application Support/iPhone Simulator/ directory and you'll get your addresses back.

If your goal was to clear out a preferences file you wrote or something similar you'll find it in that User directory, burrowing further down into Applications/[unique ID of your app]/[somewhere in here depending on what your app wrote]/

Matthew Frederick
+1  A: 

See my Using your own address book in the iPhone Simulator blog post.

Just run the script to get your own address book in the simulator.

0xced