photokit

Automate photo selection, camera capture, and media handling in iOS apps with PhotoKit and AVFoundation.

Updated Apr 30, 2026
One-click install
npx skills add https://github.com/onymchat/onym-ios --skill photokit-onymchat
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: photokit
Source: https://github.com/onymchat/onym-ios/tree/main/.claude/skills/photokit
Command: npx skills add https://github.com/onymchat/onym-ios --skill photokit-onymchat

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Implement, review, or improve photo picking, camera capture, and media handling in iOS apps using PhotoKit and AVFoundation, to accelerate development and ensure privacy-conscious UX.

Core Features & Use Cases

  • PhotosPicker and PHPicker-based image selection
  • AVCaptureSession-based camera capture and media handling
  • Privacy, permissions, and Info.plist guidance
  • Image loading, downsampling, and media display patterns
  • Real-world workflows: selecting photos, taking pictures, recording video, and managing library permissions

Quick Start

Initialize a PhotosPicker-based selection flow and a minimal AVCaptureSession to demonstrate media capture.

Frequently Asked Questions about photokit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement PhotosPicker for image selection in iOS apps?

PhotosPicker provides a native SwiftUI interface for image selection. You can implement it to present a system-standard picker UI, handle user selections, and load media efficiently without manually building a custom photo library browser.

What's the best way to manage iOS camera permissions for AVCaptureSession?

Managing camera permissions requires configuring Info.plist privacy keys and requesting access before starting an AVCaptureSession. You must handle authorized, denied, or restricted states to ensure a privacy-conscious user experience across iOS 16 and later.

How do I load and downsample images from the photo library efficiently?

Efficient image loading involves requesting PhotoKit assets and applying downsampling techniques before display. This prevents high memory consumption by ensuring images are scaled to their target display dimensions immediately upon media selection.

Does AVFoundation support both photo capture and video recording workflows?

AVFoundation supports both photo capture and video recording workflows. You configure an AVCaptureSession with specific inputs and outputs to orchestrate real-time media handling for taking pictures or recording video within your application.

Why configure Info.plist privacy descriptions for photo library access?

Configuring Info.plist privacy descriptions is required to request photo library access. Providing clear strings explaining why your app needs media permissions ensures compliance with App Store guidelines and builds user trust before accessing PhotoKit.

When should I use PHPicker instead of a custom image picker in iOS?

You should use PHPicker when you need a system-provided, privacy-safe interface for media selection. It runs out of process, requires no direct photo library access permissions, and automatically handles user privacy preferences better than custom pickers.