Gopinath
Gopinath

Reputation: 5442

It is possible to add more contact numbers for a single persion from app in iphone?

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.

Upvotes: 0

Views: 211

Answers (1)

Shahab Qureshi
Shahab Qureshi

Reputation: 950

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);

Upvotes: 1

Related Questions