It is possible to add multiple contact numbers to a single person from iPhone app. And how can i retrieve the group contacts from iPhone address book. Any sample code/tutorial available for this? Please help me to solve this. Thanks in advance.
0
votes
Did you search on SO or google?
– Yama Puvar
Thanks for response. I have search my level best in Google. I found the answer to add a single contact to address book. But, i want to add multiple contact numbers for a single name. And also i need to retrieve group of contacts from address book. Is this possible. Thanks.
– Gopinath
1 Answers
1
votes
Yes it is Possible, you can add multiple contact numbers for same Person/Contact like this
ABMutableMultiValueRef phoneNumberMultiValue = ABMultiValueCreateMutable(kABPersonPhoneProperty);
ABMultiValueAddValueAndLabel(phoneNumberMultiValue, @"11111111", kABHomeLabel, nil);
ABMultiValueAddValueAndLabel(phoneNumberMultiValue, @"987654321", kABPersonPhoneMobileLabel, nil);
ABMultiValueAddValueAndLabel(phoneNumberMultiValue, @"1234567", kABWorkLabel, nil);
ABRecordSetValue(contactPerson, kABPersonPhoneProperty, phoneNumberMultiValue, nil);