Integrates Apple's Contacts and ContactsUI frameworks to manage contact data and pickers in modern iOS and SwiftUI applications.
This skill provides specialized guidance for working with the Apple Contacts database using CNContactStore, CNSaveRequest, and CNMutableContact. It enables Claude to handle complex contact operations including asynchronous fetching, permission management for iOS 18+, and wrapping UIKit's contact picker for SwiftUI. By following best practices for key descriptors and background enumeration, it helps developers avoid common pitfalls like runtime exceptions from unfetched properties or UI blocking during heavy data processing in Swift 6.3.
Características Principales
01SwiftUI integration for CNContactPickerViewController via UIViewControllerRepresentable
02409 GitHub stars
03Predicate-based fetching and efficient batch contact enumeration patterns
04Standardized CNContactStore authorization flows including iOS 18+ limited access support
05Safe CRUD operations using CNMutableContact and CNSaveRequest with proper error handling
06Optimized key descriptor management to prevent CNContactPropertyNotFetchedException crashes
Casos de Uso
01Synchronizing local application data with the system Contacts database using background processing
02Adding contact selection functionality without requesting full database access via the system picker
03Implementing a custom address book or CRM within an iOS application