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-code

Installs 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

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

@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
1dpearson2699 avatartipkitdpearson2699/swift-ios-skillsImplement and review Apple TipKit feature-discovery UI for iOS 17+ apps. Use when adding or auditing in-app tips, contextual help, coach marks, Tip, TipView, po3.8Kskills.sh installs
2dimillian avatarswiftui-ui-patternsdimillian/skillsBest practices and example-driven guidance for building SwiftUI views and components, including navigation hierarchies, custom view modifiers, and responsive la3.7Kskills.sh installs
3avdlee avatarxcode-compilation-analyzeravdlee/xcode-build-optimization-agent-skillAnalyze Swift and mixed-language compile hotspots using build timing summaries and Swift frontend diagnostics, then produce a recommend-first source-level optim3.5Kskills.sh installs
4dpearson2699 avataravkitdpearson2699/swift-ios-skillsCreate media playback experiences using AVKit. Use when adding video players with AVPlayerViewController, enabling Picture-in-Picture, routing media with AirPla3.4Kskills.sh installs
5dpearson2699 avatarspritekitdpearson2699/swift-ios-skillsBuild 2D games and animations using SpriteKit. Use when creating game scenes with SKScene and SKView, adding sprites with SKSpriteNode, animating with SKAction 3.3Kskills.sh installs
6dpearson2699 avatarpdfkitdpearson2699/swift-ios-skillsDisplay and manipulate PDF documents using PDFKit. Use when embedding PDFView to show PDF files, creating or modifying PDFDocument instances, adding annotations3.3Kskills.sh installs