← 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.
thienqo/ios-skills · ★ 11 · AI & Automation · score 69
Install: claude install-skill thienqo/ios-skills
# Contacts Framework Use `CNContactStore`, `CNSaveRequest`, and ContactsUI to fetch, mutate, or let the user select contacts. Prefer the system picker when full address-book access is unnecessary. ## Contents - [Choose the access model](#choose-the-access-model) - [Setup and authorization](#setup-and-authorization) - [Fetch invariants](#fetch-invariants) - [Mutation invariants](#mutation-invariants) - [Concurrency and cache invalidation](#concurrency-and-cache-invalidation) - [Common mistakes](#common-mistakes) - [Review checklist](#review-checklist) - [References](#references) ## Choose the access model | Need | API | |---|---| | User chooses one or more contacts without broad permission | `CNContactPickerViewController` | | App reads or writes its authorized contact set | `CNContactStore` | | User expands an iOS 18+ limited set | `ContactAccessButton` or `contactAccessPicker` | | Import/export or sharing | `CNContactVCardSerialization` | Read [Contacts extended patterns](references/contacts-patterns.md) for a complete observable manager, SwiftUI lists, single/multi-select picker wrappers, email-only selection, optimized search, vCard import/export, groups, and change notification handling. ## Setup and authorization - Add `NSContactsUsageDescription` before direct Contacts API access; missing it causes termination. - Ordinary access needs no entitlement. Reading or writing `CNContact.note` requires the Apple-approved `com.apple.developer.contacts.notes` entitlem