How to import contacts from Mac OS X AddressBook into iPhone Simulator
ios, ios-simulator, iphone
Solution
This solution worked for me, and was incredibly easy.
The question asks about how to get Mac OSX contacts into the iOS Simulator. If you sync your iPhone with your Mac, then perform an unencrypted backup of your iPhone in iTunes, this solution will work:
- Quit the iOS Simulator
- Download iPhone/iPod Touch Backup Extractor
- Run it, and select the last option "iOS Files"
- Create a folder on your desktop and extract all files to that folder
- When complete, go to your extract folder and navigate to Library/AddressBook
- Copy both files (AddressBook.sqlitedb and AddressBookImages.sqlitedb) to: ~/Library/Application Support/iPhone Simulator/{SDK}/Library/AddressBook
- Run the Contacts application in iOS Simulator
Problem
Is there a way to import contacts automatically from my Mac OS X Address Book into the iPhone Simulator Contacts app? Or vCards or anything like that? I'm building an app that displays contacts in various ways and I'd like to have a way to have lots of contacts without typing them all in myself.