Reputation: 358
Does anyone know if this is even possible? If it is possible how can I do this? Thanks.
Upvotes: 0
Views: 852
Reputation: 26400
You can get the contact database in simulator from here. ~/Library/Application Support/iPhone Simulator/User/Library/AddressBook/AddressBook.sqlitedb
but I am not sure how you can transfer it to device
Upvotes: 2
Reputation: 3579
I have not tried this but you can save contacts as nsdata (using archiving) when you run on simulator. Extract the nsdata and save individual contact using ABAddressBookAddRecord to the phone.
For running different codes on simulator and device:
#if (TARGET_IPHONE_SIMULATOR)
//simulator code
#else
//iphone code
Upvotes: 0