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 |
Leggi, crea, aggiorna e seleziona i contatti utilizzando i framework Contatti e ContattiUI. Da utilizzare durante il recupero dei dati dei contatti, il salvataggio di nuovi contatti, il confezionamento di CNContactPickerViewController in SwiftUI, la gestione delle autorizzazioni dei contatti o l'utilizzo delle richieste di recupero e salvataggio di CNContactStore. Fonte: dpearson2699/swift-ios-skills.