Questions tagged [cncontact]

CNContact is a thread-safe class for Apple architectures (MacOS, iOS, watchOS, etc.) that represent an immutable value object for contact properties, such as the first name and phone numbers of a contact.

The contact class (CNContact) is a thread-safe, immutable value object of contact properties, such as the contact’s name, image, or phone numbers. The contact class is like NSDictionary; it has a mutable subclass CNMutableContact you can use to modify contact properties. For contact properties that can have multiple values, such as phone numbers or email addresses, an array of CNLabeledValue objects is used. The labeled value class is a thread-safe, immutable tuple of labels and values. Labels describe each value to the user, allowing differentiation such as home and work phone numbers. The Contacts framework provides some predefined labels and you can create your own custom labels.

256 questions
0
votes
0 answers

CNContacts remove access authorization

I integrated the Contacts framework in my app and the app stays authorized to access the users contacts but now I am looking for a way to remove the authorization if the user decides to do so. I am not finding a method that does that, does anyone…
JP Aquino
  • 3,946
  • 1
  • 23
  • 25
0
votes
1 answer

Is there a library or framework for creating and modifying contacts in iOS ? - Swift

I have an app that retrieve employees info from a database (name,number,email,etc..) . So is there a library or framework to create new contacts or modifying them and adding them to the contacts app in iOS using swift? if I want to show employee…
Zizoo
  • 1,694
  • 5
  • 20
  • 42
0
votes
2 answers

My app keep deny the access to contacts iOS - Swift

I have a view when it get loaded it will check first the permission to access the contacts if it's Authorized, NotDetermined or Denied .. the code at first time will go with NotDetermined so it will call function to ask for access .. the problem is…
Zizoo
  • 1,694
  • 5
  • 20
  • 42
0
votes
1 answer

iOS9 - CNContactPickerViewController : SelectionOfProperty is not working, if user have multiple phone numbers

SelectionOfProperty is not working if user has multiple phone numbers. I am using below code: let picker = CNContactPickerViewController() picker.displayedPropertyKeys = [CNContactPhoneNumbersKey] picker.predicateForEnablingContact =…
aaK
  • 103
  • 9
0
votes
0 answers

How to reduce the fetch time of CNContacts?

Hi am using CNContacts to fetch my contacts but takes around two minutes to display all the contacts in swift.Is there any way to speed up my Fetching time? do { try store.enumerateContactsWithFetchRequest(request) { contact, stop in …
0
votes
1 answer

CNContactPickerViewController shows up even after disabling access from settings

I am displaying a CNContactPickerViewController. Suppose if I disable the access from settings, it should not allow to open the controller or should say pop up saying Contacts access is disabled. But in turn it is opening the view. Why is it so ?…
Amaresh
  • 13
  • 2
  • 5
0
votes
1 answer

Multiselection in CNContactPickerViewController

I am creating a food app which requires recommendation. I am adding a feature which allows me to recommend particular food to my friends in my contact list. However, upon using CNContactViewController, I am not getting the required UI for…
Isha Balla
  • 733
  • 2
  • 9
  • 25
0
votes
1 answer

how to fetch mobile number and home number differently from contacts in iOS

I have fetched the contact numbers but i get only one number, that is either home number or mobile number. how to fetch them both? is there any specific way to do it? any help will be appreciated.
Amrut Gaikwad
  • 59
  • 2
  • 11
0
votes
0 answers

How to fetch Birthday Label from CNContactPickerViewController in objective-c?

I know in swift how to pick Birthday Label from CNContactPickerViewController, but i am little bit confuse in Objective-c Here i use code like:In Objective-c How can i pick Birthday label in "didSelectContactProperty" method. Can you please help me…
Mannam Brahmam
  • 2,225
  • 2
  • 24
  • 36
0
votes
1 answer

Unable to Returns the vCard representation of the specified CNContacts

Trying to get an NSData object with the vCard representation of the contact By using below interface. + (NSData *)dataWithContacts:(NSArray *)contacts error:(NSError * _Nullable *)error Got an NSData Object when passed one…
Stalin Pusparaj
  • 741
  • 9
  • 11
0
votes
2 answers

Converting CNContact to NSData and vice versa

I'm trying to convert CNContact objects into NSData to be sent to another device over Multipeer Connectivity. Here's my code for sending the contacts data: func sendContactsToPeer(peerId: MCPeerID, contacts: [CNContact]) { let contactsData:…
Chan Jing Hong
  • 2,251
  • 4
  • 22
  • 41
0
votes
1 answer

Thread 1: EXC_BAD_INSTRUCTION (code=EXC_1386_INVOP, SUBCODE=0X0) - ERROR

I'm using a contactPicker func to pick from contacts and add them to my created tableview. However when I run my app and click on the desired contact, my app crashes. The issues seems to be the contactPicker(CNContactPickerViewController,…
jonB22
  • 5
  • 4
0
votes
2 answers

CNContactPicker not prompting access denied

I've seen one question like this one prior, but the answer was that permission was not needed because there was no editing... however the question as to why a user prompt was not being shown was not answered. My issue is that I do need to edit so…
ioski
  • 13
  • 3
0
votes
1 answer

How To Edit Contact with identifier in ios 9 using CNContact framework?

i am using CNContact framework to retrive contacts from device and send to web using web services, but i want to edit contact using CNContact Framework but i don't know how to do...Thanks in advance
Vivek Goswami
  • 432
  • 3
  • 16
0
votes
1 answer

Is possible get ring tone,touch tone and linked contacts with all contact details using Contact Framework

Hi i am trying to get all contact details into my app.But in this i got all contact details (Givenname,Familyname,Organization and etc...) except ring tone,touch tone and linked contacts. Is possible get these 3 (ring tone,touch tone and linked…
user5102362