← ClaudeAtlas

contacts-frameworklisted

Read, create, update, and pick contacts using the Contacts and ContactsUI frameworks. Use when fetching contact data, saving new contacts, wrapping CNContactPickerViewController in SwiftUI, handling contact permissions, or working with CNContactStore fetch and save requests.
thiennc-tesoglobal/ios-skills · ★ 3 · Data & Documents · score 66
Install: claude install-skill thiennc-tesoglobal/ios-skills
# Contacts Framework Use `CNContactStore`, `CNSaveRequest`, and `CNContactPickerViewController` to fetch, create, update, or pick contacts in Swift 6.3 / iOS 26+ apps. ## Contents - [Setup](#setup) - [Authorization](#authorization) - [Fetching Contacts](#fetching-contacts) - [Key Descriptors](#key-descriptors) - [Creating and Updating Contacts](#creating-and-updating-contacts) - [Contact Picker](#contact-picker) - [Observing Changes](#observing-changes) - [Common Mistakes](#common-mistakes) - [Review Checklist](#review-checklist) - [References](#references) ## Setup ### Project Configuration 1. Add `NSContactsUsageDescription` to Info.plist explaining why the app accesses contacts. The app crashes if it uses contact data APIs without this key. 2. No additional capability or entitlement is required for ordinary Contacts access. 3. Add `com.apple.developer.contacts.notes` only when reading or writing `CNContactNoteKey` / `CNContact.note`; this entitlement requires Apple approval before public distribution. ### Imports ```swift @preconcurrency import Contacts // CNContactStore, CNSaveRequest, CNContact import ContactsUI // CNContactPickerViewController ``` ## Authorization 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. ```swift let store = CNContactStore() func requestAccess() async throws -> Bool { ret