Fetch, create, update, and pick contacts from the user's Contacts database using CNContactStore, CNSaveRequest, and CNContactPickerViewController. Targets Swift 6.2 / iOS 26+.
Request access before fetching or saving contacts. The picker (CNContactPickerViewController) does not require authorization -- the system grants access only to the contacts the user selects.
| .notDetermined | User has not been prompted yet | | .authorized | Full read/write access granted | | .denied | User denied access; direct to Settings | | .restricted | Parental controls or MDM restrict access | | .limited | iOS 18+: user granted access to selected contacts only |
Lesen, erstellen, aktualisieren und wählen Sie Kontakte mithilfe der Contacts- und ContactsUI-Frameworks aus. Wird verwendet, wenn Sie Kontaktdaten abrufen, neue Kontakte speichern, CNContactPickerViewController in SwiftUI einschließen, Kontaktberechtigungen verwalten oder mit CNContactStore-Abruf- und Speicheranforderungen arbeiten. Quelle: dpearson2699/swift-ios-skills.