New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Read, create, update, and pick contacts with Contacts and ContactsUI, including limited-access and save-recovery guidance.

skills.sh installs
3.8K
GitHub stars
1.3K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers fetching, creating, updating, deleting contacts, and the contact picker via CNContactStore, CNSaveRequest, and CNContactPickerViewController
  • Includes authorization state handling for .limited access, key descriptor selection, and save-result recovery patterns for Swift 6.3 and iOS 26+
  • Enforces fetching only the keys needed, since accessing an unfetched property throws CNContactPropertyNotFetchedException
  • Designed for iOS developers adding contact access to SwiftUI apps that must handle permissions and privacy entitlements

Install

$ npx -y skills add dpearson2699/swift-ios-skills --skill contacts-framework -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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

Details

Repository
github.com/dpearson2699/swift-ios-skills
Category
Mobile Apps
First seen
Apr 16, 2026

More from dpearson2699/swift-ios-skills

All 94

Similar to Contacts Framework

More Mobile Apps