Questions tagged [cncontactpicker]
27 questions
9
votes
1 answer
How to change color of CNContactPickerViewController searchBar
I start a CNContactPickerViewController from a viewcontroller, but how can I change the textcolor of the searchbar inside it. The navigationbar is dark blue, in iOS11 the default searchbartext is black.

tmiedema
- 174
- 7
7
votes
0 answers
Is it possible to customize CNContactPickerViewController?
I am new to iOS development and was wondering if I can modify CNContactPickerViewController tableViewCell such that the contacts who are already using my app are shown in somewhat a different way.
And add an invite button to the contacts who are not…

dev27
- 605
- 1
- 7
- 15
6
votes
2 answers
How can I pick a contact phone number in iOS?
I know how to pick a contact in iOS (using the CNContactPickerViewController), but how can I pick a specific phone number for a contact, instead of the contact itself, as a whole? That should be possible, according to the docs, but I didn't find out…

Eir
- 1,003
- 9
- 24
5
votes
1 answer
List of Contacts from Contacts App in SwiftUI
Hi I am trying to build an interface that lists all the contacts just like the Contacts and Phone app with the same UI. What I have tried so far is below. Basically I tried to implement CNContactPickerViewController from ContactsUI using the…

Faruk
- 2,269
- 31
- 42
5
votes
0 answers
CNContactPickerViewController search bar not working
I came to know that search bar in CNContactPickerViewController doesn't allow to select searched contacts. I also look other stack overflow questions regarding this issue. It seems like iOS bug. But I want to know, is there any way to hide or…

Aamir Anwar
- 93
- 1
- 10
4
votes
2 answers
iOS Swift: Get user selected phone number from CNContactProperty as a string
As the title suggests, in my iOS app using swift I've got a CNContactProperty object and I want to extract the phone number from it as a string.
The CNContact property is returned from the standard CNContactPickerViewController via the delegate…

b1skit
- 327
- 4
- 16
4
votes
1 answer
Hide action's buttons in contact details when I use CNContactPicker
I use CNContactPickerViewController and I want to hide actions buttons (call, message, facetime) from contact's detail.
I know about allowActions property in CNContactViewController, but I don't know, how I can get access to this property, if I use…

Artem
- 83
- 1
- 6
3
votes
2 answers
CNContactPickerViewController when contact has multiple mails
I'm using a CNContactPickerViewController to let the user select the email of one of his/her contacts
let contactPicker = CNContactPickerViewController()
contactPicker.delegate = self
contactPicker.predicateForSelectionOfContact =…

mtet88
- 524
- 6
- 21
3
votes
1 answer
Display CNContactPickerViewController in Container View?
I'm currently updating an old Xcode project I started working on a long time ago. I updated the deployment target to iOS 10.0 so I was forced to replace the ABAddressBook framework with Contacts framework. I used to present the…

Mark Carols
- 403
- 4
- 20
2
votes
0 answers
Enable phoneNumbers of certain format using predicateForEnablingContact in CNContactPickerViewController
I'm looking to use predicateForEnablingContact inside a CNContactPickerViewController to only enable contacts that have phoneNumbers that match the following regular expression ^\\+1[2-9]\\d{9}$.
This will mean looking at a contacts phoneNumbers and…

Fudgey
- 3,793
- 7
- 32
- 53
2
votes
1 answer
Can't get the selected number from contactProperty
After spending many hours troubleshooting, searching and trying out some answers on StackOverFlow. I couldn't get this to work properly, I need to be able to select any number that a contact have, but I always get CNLabelPhoneNumberMain or in some…

Jessica Kimble
- 493
- 2
- 7
- 17
2
votes
1 answer
CNContactPickerViewController validation for mobile number in iOS Swift
I have used CNContactPickerViewController to enable user to pick a contact from their contact list stored on the phone. I use the contact name and number using CNContactPicker delegate methods. Code as below
func contactPicker(_ picker:…

Khadija Daruwala
- 1,185
- 3
- 25
- 54
2
votes
2 answers
CNContactPickerViewController content bleeds to search bar and status bar
I'm presenting CNContactPickerViewController (strongly referenced ivar):
contactsViewController = [[CNContactPickerViewController alloc] init];
contactsViewController.delegate = self;
[self presentViewController:contactsViewController animated:YES…

Can Poyrazoğlu
- 33,241
- 48
- 191
- 389
2
votes
2 answers
Selecting multiple contacts/contact properties in CNContactPicker
I'm using the predicates defined here:
How can I pick a contact phone number in iOS?.
contactsPicker.predicateForEnablingContact = NSPredicate(format:"phoneNumbers.@count > 0")
contactsPicker.predicateForSelectionOfContact = NSPredicate(format:…

Avishek Ganguli
- 41
- 2
1
vote
1 answer
CNContactPickerViewController enable to disable multiple selection
I want to enable or disable multiple contact selection based to condition.
I have tried below solution
func onClickPickContact() {
let contactPicker = CNContactPickerViewController()
contactPicker.delegate = self
…

Pradumna Patil
- 2,180
- 3
- 17
- 46