youjinp/SwiftUIKit

onSelectContacts - searchbar

Closed this issue · 4 comments

Is it possible to show the search bar for multiple contacts selection?

Unfortunately not, search and multiple selection are mutually exclusive for CNContactPickerViewController.

You'll have to implement your own if you want them both together.

Do you know if it's possible to implement this library in SwiftUI? https://github.com/dragosrobertn/KNContactsPicker

It has the ability to do multi-select and search

The problem I have with that is that it requires Privacy - Contacts Usage Description in the info plist, and users are required to explicitly allow access to their contact list.

Whereas using the built in CNContactPickerViewController doesn't require any permission.

With that said, most things built using UIKit can be brought into SwiftUI by simply using UIViewControllerRepresentable. Hope that helps!