ios - Create ABPersonRef that is local only - i.e. not synced to exchange -


I am working on a contact management application that syncs contact data with Microsoft Exchange.

I would like to be able to make contacts in the IOS address book which are only local contacts - i.e. they will be present only on the device and will not be synchronized in the Microsoft Exchange.

I was under the impression that I can make it as a contact using ABPersonCreateInSource , although it has been found that the function is a special source is needed. Although it is not possible to create a source (i.e. you can not create a "local" source) You need to calculate the existing sources on the device.

I am finding out that if you are syncing the device with the exchange then you will have one or more kabsourceTypeExchange source, but there will be no local sources though If you do not have any Exchange source, then you have kabSourceTypeLocal as your source.

Do anyone know how to make this as a local contact only, and in that case will not be synced with Microsoft Exchange, where there is an Exchange account configured on the device?

itemprop = "text">

I had this problem recently, now it is an old post and since there was no direct answer online. For such a person leaves my 2 cents.

You can make a local contact, I found that making this contact is not good at all, but iPhone 4 local contacts will not be displayed on any group but if all contacts are displayed On iPhone 5 and above, these contacts do not appear on any group, if all contacts are displayed, and if the only way to access those contacts is through the recent call log Which will show contact information, or search for contacts, because it does not appear on quick search

  ABAddressBookRef address book = ABAdressbookCreate WithOptems (zero, zero); ABRecordRef Basics = ABAddressBookGetSourceWithRecordID (address books, kabSourceTypeLocal); ABRecordRef myLocalContact = ABPersonCreateInSource (Original Handbook); CFRelease (nativebook); // ... fill out the contact and save it on the addressbook. CFErrorRef error = NULL; ABAddressBookAddRecord (Address BookRiff, myLocalContact, and Error); Save ABAddressBook (Address Book, RF, and Error); CFRelease (addressBookRef);  

These contacts will not be synchronized with the Exchange account. Instead of linking local contacts with them, I strongly recommend that this work should be added to the iCloud account, in such a way, the contact will not show on the Exchange account and the user at any time wants to contact this contact.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -