abaddressbook

How Do I Obtain A User Selected Email Address From ABPeoplePicker?

╄→尐↘猪︶ㄣ 提交于 2019-12-20 07:39:58
问题 Someone else here on Stackoverflow posted a way to obtain a user selected phone number from the contacts list. Could be done for email addresses and if so, how do I do it? Here is the code: - (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier { if (property == kABPersonPhoneProperty) { ABMultiValueRef multiPhones =

Intermittent error accessing core data model / contacts database

◇◆丶佛笑我妖孽 提交于 2019-12-20 07:26:41
问题 I am getting an error in my iOS app. Frustratingly, it is an intermittent error - The task I am performing works 5 or 6 times in a row then crashes unexpectedly. The error log suggests an error opening a sqlite database - presumably the core data model in my app. However Xcode shows that the line in which the error occurs is accessing the Apple contacts database. So I am not clear what has happened. The error log is below. Can anyone interpret the output below and shed any light on this?

Toggling Privacy settings will kill the app

 ̄綄美尐妖づ 提交于 2019-12-17 04:54:59
问题 I have an app that uses the iPhone's contacts. With iOS 6, the user will be prompted for Contact access on the first try. At this point, the user can hit 'Allow' or 'Don't Allow'. The problem is when the user backgrounds the app, and then navigates to Settings->Privacy->Contacts to toggle the Contact privacy setting for my app. Once it is toggled, I can see on the console that my app: Application 'UIKitApplication:com.myApp' exited abnormally with signal 9: Killed: 9 I can't find any

Programmatically delete custom phone labels

给你一囗甜甜゛ 提交于 2019-12-14 02:36:04
问题 In iOS it is possible to create custom labels for phone numbers and email addresses. Is there a way to remove those created labels programatically (either with CNContacts or ABAddressBook)? In other words: I don't want to delete the custom label from a contact, I want to delete the "custom label" from the system so it doesn't show up at all when someone brings up the available available list. Attached iOS 9 source code that creates a contact in the phone book with custom labels on the email

Objective-C Adding Contact to Favorites [closed]

懵懂的女人 提交于 2019-12-13 09:42:48
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I know a new contact can be created in an iOS addressbook. Is there a way to also flag that contact and set it as a 'Favorite' programmatically? 回答1: I am not aware of any public API for this. And it makes sense, since this is a very invasive action. You should not be doing this -

ABAddressBookCopyArrayOfAllPeople returns empty array on device [closed]

孤街浪徒 提交于 2019-12-13 09:26:03
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . I develop application on iOS 6 that need access to AddressBook, I'm using following code: NSMutableArray *contacts = [[NSMutableArray alloc]init]; CFErrorRef *error = nil; ABAddressBookRef addressBook =

How to create contacts list like whats app did

左心房为你撑大大i 提交于 2019-12-13 03:01:39
问题 I'm working on an app that creates an user profile. I need to be able to see who from my contacts has the app installed so that i am able to grant them access to my profile and see their profiles. How do i get the full contact list, determine my phone number to create my account with it, and check how many people from the contacts have the app installed? (similar to how WhatsApp does it) I know it's possible to get the contact list by using Apple API's, but do i have to send all the

Unable to access kABPersonNoteProperty

匆匆过客 提交于 2019-12-13 02:04:50
问题 I have the following code which copies data from the iPhone's contacts into an NSMutableDictionary. I'm using optional binding as discussed in this answer. The firstName and lastName fields copy properly (as well as phone and email fields not shown here), but I have never been able to access the kABPersonNoteProperty , nor have I seen the println statement in the log. I've tried to copy the note as both String and NSString without success. Any ideas what could be causing this problem? var

How to get ABRecordRef from ABRecordID?

纵饮孤独 提交于 2019-12-12 10:36:23
问题 I have accessed the address book and success fully extracted the records and necessary info from it. I have also extracted recordid . My problem is how to use this recordid to extract record later. The code which I am using is: ABRecordID recordId; ABAddressBookRef _addressBookRef = ABAddressBookCreate (); NSArray* allPeople = (NSArray *)ABAddressBookCopyArrayOfAllPeople(_addressBookRef); for (id record in allPeople) { recordId = ABRecordGetRecordID(record); //i am saving each one how to use

convert kABPersonPhoneProperty to arabic numbers

冷暖自知 提交于 2019-12-12 10:22:17
问题 I'm reading phone numbers from the phone address book , some numbers are saved there in non arabic numbers i.e ( ١٢٣٤٥٦٧٨٩ ) how can i convert these numbers to arabic numbers ( 123456789 ) that's how i extract the numbers CFTypeRef phoneProperty = ABRecordCopyValue(record, kABPersonPhoneProperty); NSArray *phones = (__bridge_transfer NSArray *)ABMultiValueCopyArrayOfAllValues(phoneProperty); now phone contains phone numbers as NSString objects 回答1: Tested: -(NSString*)arabicToWestern: