Questions tagged [contactsui]
14 questions
18
votes
5 answers
UIViewControllerRepresentable and CNContactPickerViewController
Can't seem to create a UIViewControllerRepresentable that works with CNContactPickerViewController.
Using Xcode 11 beta 4, I've created number of other UIViewControllerRepresentable using other UIViewController and those have worked fine. I've…

Jason M.
- 305
- 2
- 6
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
4 answers
iOS ContactsUI Framework Permissions
I'm fetching contacts using CNContactPickerViewController, and it seems that iOS doesn't automatically ask me for access permissions.
Do I really need permissions for using CNContactPickerViewController or do I need to request for permissions…

chrisamanse
- 4,289
- 1
- 25
- 32
2
votes
1 answer
Limit selections in ContactPicker Swift4
I am using ContactsUI to have a user select contacts. Everything works properly but I would like to limit the number of contacts that can be selected. Is this possible?
1
vote
2 answers
CNContact birthday displayed with a timezone gap
I'm trying to get the birthday of person that i fetch in the Contacts app using the ContactsCN Framework.
The person's birthday in the Contacts apps is June 22, 1980.
In my app, the actual result is June 21, 1980. The desired result is June 22,…

Pat N.
- 35
- 5
0
votes
1 answer
how solve ContactUI with iOS16 no cancel and done buttons
I have a little trouble with the ContactsUI in my app. With iOS 16 when I want add a contact there are not the cancel and done button. Have someone an idea how to solve it ?
I have attached code and screen
import SwiftUI
import Foundation
import…

Beppe_93
- 13
- 1
- 8
0
votes
2 answers
SwiftUI How to update State property when if was updated from sheet view
I Have a textfield where you can enter name and a button to choose from contacts, but as I choose from contacts the textfield doesn't update and looks empty (and saves empty result), but as I press the button once more it updates the textfield, how…

Roman R
- 39
- 8
0
votes
1 answer
reload table view when Contact Added swift
i used ContactUI FrameWork to fetch , Edit , create new Conatacts . there is a table view in VC1 to show contacts , there is another View Controller for edit or create new contacts. the problem it is table view in VC1 Doesnt Update When edit or…

mehran kmlf
- 25
- 8
0
votes
2 answers
Presenting ContactUI CNContactViewController results in a privacy error and a CNUI error
I tried to programmatically present a CNContactViewController for a new contact, but I got error "Access to PassKit Shared Cache file denied. Please verify sandbox exceptions and/or file a Radar." The CNContactViewController also did not present.
I…

Matt
- 560
- 1
- 5
- 12
0
votes
0 answers
CNContact: how to know which postal address properties to display for a given country?
The goal is to create a custom form for entering contact addresses.
If you edit a contact's properties with a CNContactViewController on iOS, the properties in a postal address change based on the country.
For instance, Afghanistan postal addresses…

Crashalot
- 33,605
- 61
- 269
- 439
0
votes
1 answer
Custom message when requesting user's permission to Contacts
I'm using this code to request access to the Contacts UI:
let store = CNContactStore()
store.requestAccess(for: .contacts) { (granted, error) in
if let error = error {
print(error)
}
…

Rod
- 424
- 2
- 7
- 17
0
votes
1 answer
IOS9 ContactsUI Specific Condition
I am using the Contacts and ContactsUI in IOS9 and swift and happy with it.
In my program, I want the user to add a contact by using only these keys:
GivenName, FamilyName, PhoneNumbers, EmailAdresses.
However when I set these values in…

FamousMaxy
- 686
- 5
- 21
0
votes
1 answer
Swift 2.0 ContactsUI Framework
I am working on a project in Swift 2.0 that requires me to use the IOS 9s ContactUI Framework. The issue that I am having is properly picking a phone number from the contacts list. When I select a phone number from a contact, the application…

bradosev
- 11
- 2
-1
votes
1 answer
How to use CNContactViewController just for creating new contacts? (Swift)
I have an app that needs to add contacts. For that I want use the CNContactViewController(forNewContact: nil) from the ContactsUI framework.
My approach to achieve this is the following
class myClass: UITableViewController,…

Eduard
- 61
- 7