This is a small template for imitating the CNContactPickerViewController
from UIKit in SwiftUI.
The problem with this exact ViewController is that it doesn't seem to work by using the UIViewControllerRepresentable
protocol in SwiftUI. There are a few workarounds, for example as described here. These workarounds work quite ok, but don't provide the best user experience.
My solution does currently not support:
- Searching for contacts
- Jumping to a specific letter
- Order of displaying family name / given Name depending on user settings
If you would like to contribute, feel free to create a fork and open pull requests.