abaddressbook

Copying contacts from one source to another

筅森魡賤 提交于 2019-12-04 14:31:51
问题 I'm trying to copy contacts between my Local contact source and the iCloud contact source and I'm not seeing any results. This code executes without error and seems like it should work, but I don't see the newly created contacts afterward. Anyone see any issues with it? ABAddressBookRef addressBook = ABAddressBookCreate(); ABRecordRef abSourceSource = ABAddressBookGetSourceWithRecordID(addressBook, kABSourceTypeLocal); ABRecordRef abDestinationSource = ABAddressBookGetSourceWithRecordID

Strange behaviour with iOS kABPersonModificationDateProperty, seems to update all the time

点点圈 提交于 2019-12-04 11:14:08
I'm seeing really weird behaviour in my iOS app using the ABAddressBook library. Wondering if anyone can give me some insight into whats happening in the background or if I have a logic error I just can't see. Long story short I'm making a VOIP app that relies heavily on importing the user's contacts. I keep an online backup of these that are also used in conjunction with push notifications. As they are modified on the phone I need to send an update request to the server to keep them accurate. The problem is many user devices are frequently spamming the server with very large blocks of

AddressBook: how to get names of different Exchange sources

你说的曾经没有我的故事 提交于 2019-12-04 10:50:40
I want to get the name of all the Exchange sources that my iPhone is synced to. For e.g. if I sync my device to Gmail and Hotmail accounts using ActiveSync Exchange, in the native contacts, I can see different sections based on the different accounts that I have setup. When I try to programmatically do the same, the only information I get is sourceType (which is Exchange in both cases) and sourceName (which is "Contacts" in both cases). There's no way for me to differentiate which is the Gmail "Contacts" and which is the Hotmail "Contacts". Anyone know how to do this? Here's my code:

How to create vCard/vcf file to use in share sheet?

半世苍凉 提交于 2019-12-04 08:34:43
问题 I'm new to swift and methods I am finding are deprecated regarding my issue. I'm building a directory app and I'm pulling contact data from an API, not from the phone's address book. In iOS, if you go to your address book, you can select a contact and choose 'Share Contact' which brings up a share sheet. I want this exact functionality in my app. I think I've got Share Sheets figured out, and here's my code for that: @IBAction func actShare(sender: AnyObject) { let activityViewController =

ABRecordCopyValue return 0 ?

余生长醉 提交于 2019-12-04 05:41:36
问题 What I trying to do, is get all contacts and relies if the contact have SocialProfileProperty or not, after get all this contacts that have SocialProfileProperty I will make simple filtration to know if it is Facebook,Twitter,.. Before I post this question I west full day trying to find any solution for this problem ?? But it is allows return 0 ?? ABAddressBookRef addressBook; CFErrorRef *erer = NULL; addressBook = ABAddressBookCreateWithOptions(NULL, erer); CFArrayRef _allPeople =

Programmatically change linked contacts array in ABAddressBook, ABPersonCopyArrayOfAllLinkedPeople

拥有回忆 提交于 2019-12-04 05:24:48
Can one programmatically add/remove the contacts inside the CFArray returned by ABPersonCopyArrayOfAllLinkedPeople , thus, effectively, linking and un-linking different records of contacts from various sources to show as "unified" in the iOs phone book? As far as I've been able to determine, there is no public API exposed for linking or unlinking contacts, at least in the iOS 6 SDK. However, it does appear that you can create links between contacts by calling the undocumented, private function bool ABPersonLinkPerson(ABRecordRef from, ABRecordRef to) . That signature may not be exactly right-

How whatsapp get updated contacts from addressbook faster in iOS?

回眸只為那壹抹淺笑 提交于 2019-12-04 02:08:29
My findings I am designing a logic to sync contact with my Backend. I gone through some apps that doing same thing in IOS. I will take the example of WhatsApp, I found that When I update any contact in Native Addressbook, it reflect that change into Whatsapp withing a fraction. My Concern I just want to know that how it is syncing in a very faster way. Even a new contact gets synced with its Remote server and get displayed on contact, and with the ability to initiate Whatsapp chat if that number is registered one. Summary of Queries So, in nutshell my queries are, How Whatsapp is syncing the

iPhone AddressBook - how to create a new record with app from my App

我的未来我决定 提交于 2019-12-03 22:33:18
I'm trying to create a new record of Person thru my App. I have the name, email and phone nr. How can i pass them to the modal view of newPerson? I'm following Apple's docs, but i'm stuck. I'm using a ABNewPersonViewController. Is that correct? How do I fill the fields in the modal view? Thanks, RL Jason Coco If you want to display something in the ABNewPersonViewController, you have to create and set up an ABRecordRef for the properties you want to pre-fill and then set the displayedPerson property on ABNewPersonViewController. So a simple example may be: - (void)createNewPerson { // Create

ABAddressBook store values in NSDictionary

橙三吉。 提交于 2019-12-03 22:20:54
问题 I have an app that displays ABAddressBook contacts in a UITableView . Currently I'm reading the contacts into an NSDictionary , however this appears to crash for some users, which I suspect is a memory issue. Is there another approach to display ABAddressBook contacts in a UITableView without either first storing them in an NSDictionary or using ABPeoplePicker ? 回答1: You can use following way, ABAddressBookRef ab = ABAddressBookCreateWithOptions(NULL, NULL); NSArray *arrTemp = (NSArray *

Swift: Copy Information Selected by User in ABPersonViewController to Dictionary

天大地大妈咪最大 提交于 2019-12-03 22:07:07
I'm trying to implement the func personViewController(personViewController: ABPersonViewController!, shouldPerformDefaultActionForPerson person: ABRecord!, property property: ABPropertyID, identifier valueIdentifier: ABMultiValueIdentifier) -> Bool function, which is part of the ABPersonViewControllerDelegate protocol and is called whenever the user clicks on an item in the ABPersonViewController , such that any information the user selects will be copied to a [String : String] dictionary such that the property name will be the key for the property value: [..."kABPersonFirstNameProperty" :