-1

I was new in iPhone application development. As i might have gone through native applications, i was struggling from 1 week, for adding new fields to a particular contact of AddressBook.

As we might have known that it is not possible to edit addressBook details, i want to bind those values to sqlite3 table & then i thought to add new fields to selected contact.

Can anyOne of you push me out of this situation..? (Plz,provide me with the Sample Code to test.)

Note: AS I have no device,i need to test it using iPhone Simulator. Let me know, would it be Possible or not?

Thanks & Regards,

Ramya.

Ramya
  • 168
  • 3
  • 10

1 Answers1

0

See these questions:

iPhone Address Book custom property
iPhone: Create Custom Field in contacts

Community
  • 1
  • 1
Jeff Kelley
  • 19,021
  • 6
  • 70
  • 80
  • @ Jeff Kelley, Thank you so much for providing me the links.I already had a look on those. I worked with displaying contacts list in my apps using AddressBook Framework. But, i want to store the AddressBook values in a "contacts" table of sqlite3 database.how can i pass AddressBook data to insert into contacts table using sqlite3 commands..can you provide me with an example? – Ramya May 18 '10 at 03:16
  • I wrote up a blog post on getting the addresses out of contacts. You can use the functions in it to get at whatever data you need. http://blog.slaunchaman.com/2009/01/21/cocoa-touch-tutorial-extract-address-book-address-values-on-iphone-os/ – Jeff Kelley May 18 '10 at 03:22
  • Thank You,Let me tell you a-bit clear what i need is? I need to insert the addressbook contacts in my own database with the help of sqlite3.So,to insert values into my table ,i am using the query like: insert into Contacts(FirstName, Phoneno, Email) Values(?,?,?) . I want to use this query for inserting addressbook values into contacts table of my database. Would it be possible?If Yes, please help me.. – Ramya May 18 '10 at 03:57
  • Like I said, read the blog post. For instance, this returns someone's first name: `ABRecordCopyValue(person, kABPersonFirstNameProperty)` where `person` is an `ABRecordRef`. – Jeff Kelley May 18 '10 at 05:29
  • (1)Yes,OfCourse. Is it possible to get all properties of a person at a time. If yes,how? (2)If not possible, how can i use this kABFirstNameProperty in sqlite3 insert command. (3)As person is an instance of ABPersonViewController class,is it possible to use it in another method/class? Please guide me the way... Thanks in advance... – Ramya May 18 '10 at 05:57
  • I'm not going to write all your code for you. I've given you more than enough resources to accomplish your goal. – Jeff Kelley May 18 '10 at 16:11