
Contacts Framework
A solid reference for working with iOS Contacts and ContactsUI frameworks. Covers the full cycle: requesting authorization, fetching contacts with the right key descriptors, creating and updating entries with CNMutableContact and CNSaveRequest, and wrapping CNContactPickerViewController for SwiftUI. The authorization states table is handy for handling the iOS 18+ limited access mode. Good emphasis on only fetching the keys you need to avoid runtime exceptions, and the composite descriptor pattern for name formatting is the right way to do it. The picker wrapper is clean and saves you the boilerplate. Targets Swift 6.3 and iOS 26+, so it assumes you're on recent toolchains.
- skills.sh installs
- 3.8K
- GitHub stars
- 1.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add dpearson2699/swift-ios-skills --skill contacts-framework --agent claude-codeInstalls into .claude/skills of the current project.
Files
Contacts Framework
Use CNContactStore, CNSaveRequest, and CNContactPickerViewController to
fetch, create, update, or pick contacts in Swift 6.3 / iOS 26+ apps.
Contents
- Setup
- Authorization
- Fetching Contacts
- Key Descriptors
- Creating and Updating Contacts
- Contact Picker
- Observing Changes
- Common Mistakes
- Review Checklist
- References
Setup
Project Configuration
- Add
NSContactsUsageDescriptionto Info.plist explaining why the app accesses contacts. The app crashes if it uses contact data APIs without this key. - No additional capability or entitlement is required for ordinary Contacts access.
- Add
com.apple.developer.contacts.notesonly when reading or writingCNContactNoteKey/CNContact.note; this entitlement requires Apple approval before public distribution.
Imports
@preconcurrency import Contacts // CNContactStore, CNSaveRequest, CNContact
import ContactsUI // CNContactPickerViewController
Sponsors
Details
- Repository
- github.com/dpearson2699/swift-ios-skills
- Category
- Mobile Development
- First seen
- Apr 16, 2026
More from dpearson2699/swift-ios-skills
All 98- Alarmkit3.8K
- Core Nfc3.8K
- Swift Codable3.8K
- Tipkit3.8K
- App Clips3.8K
- Permissionkit3.7K
- Energykit3.7K
- Shareplay Activities3.7K
- Weatherkit3.6K
- Activitykit3.5K
- Cloudkit3.5K
- Photokit3.4K
- Mapkit3.4K
- Swiftui Webkit3.4K
- Realitykit3.4K
- Avkit3.4K
- Spritekit3.3K
- Cryptokit3.3K
- Metrickit3.3K
- Pdfkit3.3K
- Gamekit3.3K
- Eventkit3.3K
- Musickit3.3K
- Swift Architecture3.3K