← ClaudeAtlas

photokitlisted

Implement, review, or improve photo picking, camera capture, and media handling in iOS apps using PhotoKit and AVFoundation. Use when working with PhotosPicker, PHPickerViewController, camera capture sessions (AVCaptureSession), photo library access, image loading and display, video recording, or media permissions. Also use when selecting photos from the library, taking pictures, recording video, processing images, or handling photo/camera privacy permissions in Swift apps.
dpearson2699/swift-ios-skills · ★ 730 · Code & Development · score 80
Install: claude install-skill dpearson2699/swift-ios-skills
# PhotoKit Modern patterns for photo picking, camera capture, image loading, and media permissions targeting iOS 26+ with Swift 6.3. Patterns are backward-compatible to iOS 16 unless noted. See [references/photokit-patterns.md](references/photokit-patterns.md) for complete picker recipes and [references/camera-capture.md](references/camera-capture.md) for AVCaptureSession patterns. ## Contents - [PhotosPicker (SwiftUI, iOS 16+)](#photospicker-swiftui-ios-16) - [Privacy and Permissions](#privacy-and-permissions) - [Camera Capture Basics](#camera-capture-basics) - [Image Loading and Display](#image-loading-and-display) - [Common Mistakes](#common-mistakes) - [Review Checklist](#review-checklist) - [References](#references) ## PhotosPicker (SwiftUI, iOS 16+) `PhotosPicker` is the native SwiftUI replacement for `UIImagePickerController`. It runs out-of-process, requires no photo library permission for browsing, and supports single or multi-selection with media type filtering. ### Single Selection ```swift import SwiftUI import PhotosUI struct SinglePhotoPicker: View { @State private var selectedItem: PhotosPickerItem? @State private var selectedImage: Image? var body: some View { VStack { if let selectedImage { selectedImage .resizable() .scaledToFit() .frame(maxHeight: 300) } PhotosPicker("Select Photo", selection: $selectedItem, matching: