What problem does it solve?
This skill reduces the complexity and common failure points of picking photos, capturing images or video, loading media efficiently, and requesting the right iOS privacy permissions without crashing or blocking the UI.
Core Features & Use Cases
- PhotosPicker and PHPickerViewController patterns: Choose single or multiple photos and filter by media type (images, videos, live photos, screenshots) using modern SwiftUI-friendly APIs.
- Asynchronous media loading and rendering: Load selected assets via Transferable, present them in SwiftUI, and downsample large images to avoid memory spikes.
- Camera capture with AVFoundation: Configure and run AVCaptureSession models, preview with a SwiftUI representable, capture photos, record video, and handle camera permissions.
- Privacy and permissions guardrails: Request/check photo library and camera access correctly, guide users when denied, and ensure Info.plist usage keys are present.
Quick Start
Implement photo picking with PhotosPicker and load the chosen image asynchronously, then downsample it before rendering in a SwiftUI grid or detail view.