How to delete one number of iphone contact which has multiple numbers in the contact?

只愿长相守 提交于 2019-12-06 01:52:14
Anil Prasad

You Can refer following links which will be helpful to you......

http://www.xprogress.com/post-56-best-example-of-how-to-add-entry-to-contacts-using-addressbookui-framework-on-iphone-sdk/

http://www.modelmetrics.com/tomgersic/iphone-programming-adding-a-contact-to-the-iphone-address-book/

iOS - add contact into Contacts?

With the help of these links you can know to add contact to iphone OS programatically...

To resolve this problem you have to get the existing contact object(ABRecordRef object) which you have to update ,get the number property label object which contains all the numbers,remove the number which u want to delete from the ABMutableMultiValueRef of the numbers which u have to prepare.Then after doing all the stuffs... use following code...

ABRecordSetValue(person, kABPersonPhoneProperty, multiPhone,nil);

Then save the addressbook using following code....

ABAddressBookSave(iPhoneAddressBook, &error);

This code is on the basis of my R&D, try this it must work....Thanks!!!

In order to delete all contacts form iPhone, you have them syncing with another source (gmail, windows contacts, Yahoo, etc.) then in iTunes, select your iPhone under devices (left side), go to Info (top), deselect "Sync contacts with".

When you do this, it will ask you to remove your contacts or not. Click on "Remove Contacts", and then Apply (botton right).

If you don't have your contacts sync'd, then you can either setup a temporary sync to what service you have access to and then do the above, or do them one at a time.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!