views:

58

answers:

1

I'm developing an application that get access to the iPhone address book. The simulator contains only a few sample entries. I'd like to find a sample address book with thousands of entries with various character set (English, Chinese, Arabic, etc) to fully test my app. Filling the address book myself will take for ever.

Basically I need a AddressBook.sqlitedb file with as much data as possible

A csv would probably do just fine if there is a way to transfer it into a sqlitedb file

+1  A: 

Good question, I'll have to give this a go myself later, but just from combining a few things I found around the web the following might work for you:

  1. Install Sun OpenDS and fill it with test data using the checkbox provided

  2. Connect your Mac's address book app to this directory server on localhost and sync (will fill your local address book with the same sample data)

    as described here: http://blogs.sun.com/treydrake/entry/mac_address_book_and_opends

  3. Sync to a real iPod/iPhone

  4. Extract the resulting files from your iPhone/iPod's

/User/Library/AddressBook/

and copy into:

/Users/[your user name]/Library/Application Support/iPhone Simulator/[iOS version]/Library/AddressBook/

if your device is jailbroken 'Phone Disk' from macroplant.com is a convenient way to do this (but there are of course many others including SCP etc)

(if your device isn't jailbroken, you can extract the database from a backup using the shell script here: http://0xced.blogspot.com/2009/01/using-your-own-address-book-in-iphone.html just note you'll need to change the path it copies it to to the one above, or your home folder or something and copy manually, as the simulator path in that post is for the previous version of the SDK)

As a minor aside but related to address book testing, I'd highly recommend also adding an Exchange account on a real device (as you can't do that in the simulator) and testing with that - it threw up some bugs in our app (crash on attempting to access the address book).

dsmudger