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

Modern PhotoKit and AVFoundation patterns for iOS 26 picking, camera capture, image loading, and media permissions.

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

What it does

  • Covers PhotosPicker single and multi-selection, media type filtering, and Transferable-based loading of picked items
  • Includes permission handling for photo library read-write, add-only, and camera access with Info.plist keys and denied-state UI
  • Enforces async loading in a Task with nil and thrown-error handling, since users may pick undecodable formats
  • Designed for Swift apps that need photo selection, camera capture, or video recording with privacy-compliant permission flows

Install

$ npx -y skills add dpearson2699/swift-ios-skills --skill photokit -y

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

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+)

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?

Details

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

More from dpearson2699/swift-ios-skills

All 94

Similar to Photokit

More Mobile Apps