Can an iPhone App access the notes field in the Contact Book? I am assuming that the user has permitted the app to allow access to "Contacts" when prompted.
Can all available fields in Contacts be accessed?
Can an iPhone App access the notes field in the Contact Book? I am assuming that the user has permitted the app to allow access to "Contacts" when prompted.
Can all available fields in Contacts be accessed?
Yes, you get the note value like you would for the other properties. For example, you can use ABRecordCopyValue
with the kABPersonNoteProperty
. See the Address Book Programming Guide for iOS, notably the Direct Interaction: Programmatically Accessing the Database chapter.
For example, to get the last name, you would:
NSString *name = CFBridgingRelease(ABRecordCopyValue(person, kABPersonLastNameProperty));
To get the note, you would:
NSString *note = CFBridgingRelease(ABRecordCopyValue(person, kABPersonNoteProperty));
See the Constants section of the ABPerson Reference for a list of the properties that can be retrieved.