
Photokit
Handles the full stack of iOS photo and camera work: PhotosPicker for SwiftUI photo selection, AVCaptureSession for camera capture, PHPhotoLibrary for direct library access, and all the permission handling that goes with it. The patterns target iOS 16+ with Swift 6.3, covering both the modern PhotosPicker (which runs out-of-process and needs no permissions for browsing) and the older PHPicker/UIImagePickerController when you need them. Includes concrete examples for single and multi-selection, media type filtering, Transferable loading, and the two-tier photo library permission model. Use this when you need to let users pick photos, take pictures, record video, or save media back to their library.
- skills.sh installs
- 3.4K
- GitHub stars
- 1.3K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add dpearson2699/swift-ios-skills --skill photokit --agent claude-codeInstalls into .claude/skills of the current project.
Files
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 for complete picker recipes and references/camera-capture.md for AVCaptureSession patterns.
Contents
- PhotosPicker (SwiftUI, iOS 16+)
- Privacy and Permissions
- Camera Capture Basics
- Image Loading and Display
- Common Mistakes
- Review Checklist
- 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
import SwiftUI
import PhotosUI
struct SinglePhotoPicker: View {
@State private var selectedItem: PhotosPickerItem?
@State private var selectedImage: Image?
Sponsors
Details
- Repository
- github.com/dpearson2699/swift-ios-skills
- Categories
- Git & Pull Requests, Code Review & Quality, Mobile Development, Video & Audio Editing
- First seen
- May 16, 2026
More from dpearson2699/swift-ios-skills
All 98- 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
- Pencilkit3.3K
- Carplay3.2K
- Ios Simulator3.2K
- Scenekit3.2K
- Homekit3.2K
- Accessorysetupkit3.2K
- Callkit3.2K
- Cryptotokenkit3.2K
- Financekit3.2K
- Adattributionkit3.2K
- Paperkit3.2K
- Passkit3.2K