LogoAwesome Skills
  • Search
  • Category
  • Tag
  • Blog
LogoAwesome Skills
LogoAwesome Skills

Discover Open-Source Agent Skills for AI Coding Assistants

Product

  • Search
  • Category
  • Tag
  • Blog

Resources

  • Claude Skill Docs
  • Antigravity Skills Docs

Tools

  • Claude Code
  • OpenCode
  • Cursor
  • Codex
  • Antigravity

Company

  • Privacy Policy
  • Terms of Service
  • Sitemap

©2026 Awesome Skills. All rights reserved.

Privacy PolicyTerms
Back to Skills

photokit

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.

832stars43forksUpdated 7/5/2026
Developer Tools#ios#avfoundation#permissions#swift#photokit#swiftui

Security Assessment

Safe(100/100)
Security Score100/100

About photokit

Modern iOS patterns for photo picking, camera capture, image loading, and media permissions using PhotoKit and AVFoundation. It targets iOS 26+ with Swift 6.3 while remaining backward-compatible to iOS 16 unless noted, and applies when working with PhotosPicker, PHPickerViewController, AVCaptureSession, photo library access, image display, video recording, or media privacy permissions.

The centerpiece is PhotosPicker, the native SwiftUI replacement for UIImagePickerController. Because it runs out-of-process, it requires no photo library permission to browse and only grants access to the items the user selects. The skill shows single-selection and multi-selection pickers (with maxSelectionCount), media-type filtering via PHPickerFilter composites such as .images, .videos, .livePhotos, and .screenshots plus combinations like .any(of:) and .all(of: [.images, .not(.screenshots)]), and asynchronous item loading through loadTransferable(type:), including defining a custom Transferable type with a DataRepresentation. Loading is always done inside a Task to avoid blocking the main thread, with nil and error handling for undecodable formats.

The privacy section explains the two photo library access levels, add-only (NSPhotoLibraryAddUsageDescription) and read-write (NSPhotoLibraryUsageDescription), and when each is needed, noting that the system automatically presents the limited-library picker for .readWrite requests. It provides async helpers for checking and requesting PHPhotoLibrary and AVCaptureDevice authorization, a ContentUnavailableView-based pattern for guiding users to Settings when access is denied, and a table of required Info.plist keys including NSCameraUsageDescription and NSMicrophoneUsageDescription. Additional reference files cover complete picker recipes and AVCaptureSession camera patterns. Use it to implement, review, or improve any photo, camera, or media-handling feature in a Swift app while following current permission and concurrency best practices.

FAQ

Does PhotosPicker require photo library permission?

No. PhotosPicker runs out-of-process and requires no permission to browse; it only grants access to the items the user selects. Request explicit permission only when reading the full library or saving photos.

What iOS versions does the skill target?

It targets iOS 26+ with Swift 6.3, and its patterns are backward-compatible to iOS 16 unless a specific note says otherwise.

How do I restrict the picker to certain media types?

Use PHPickerFilter composites with the matching parameter, such as .images, .videos, .livePhotos, .screenshots, or combinations like .any(of: [.images, .videos]) and .all(of: [.images, .not(.screenshots)]).

Which Info.plist keys do I need?

NSPhotoLibraryUsageDescription for reading the library, NSPhotoLibraryAddUsageDescription for saving, NSCameraUsageDescription for camera access, and NSMicrophoneUsageDescription for microphone use such as recording video with audio.

How should I handle a user who denies access?

Guide them to Settings rather than repeatedly prompting or hiding functionality silently. The skill shows a ContentUnavailableView with an Open Settings button using UIApplication.openSettingsURLString.

All Files

5 files
references/photokit-patterns.md18.2 KB
View
references/image-loading-caching.md24.7 KB
View
references/av-playback.md19.7 KB
View
SKILL.md16.7 KB
View
references/camera-capture.md22.8 KB
View

Install photokit

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

dpearson2699/swift-ios-skills

Related Skills

editor

145

go-code-review

165

om-close-fixed-issues

213

expressive

3,011