Skip to content

Photo Library API Reference

Comprehensive API reference for PhotoKit and photo pickers covering PHPickerViewController, PhotosPicker, PHPhotoLibrary authorization, PHAsset fetching, PHImageManager image requests, and asset creation.

When to Use This Reference

Use this reference when:

  • Looking up PHPickerConfiguration options and filter syntax
  • Checking PhotosPicker modifiers for embedded, inline, or compact styles
  • Understanding PHAuthorizationStatus values and access levels
  • Fetching assets with PHFetchOptions predicates and sort descriptors
  • Requesting images from PHImageManager with delivery modes
  • Creating assets with PHAssetCreationRequest including deferred photo proxies
  • Implementing PHPhotoLibraryChangeObserver for library sync

Example Prompts

Questions you can ask Claude that will draw from this reference:

  • "What are all the PHPickerFilter options?"
  • "How do I configure PhotosPicker for inline embedded style?"
  • "What's the difference between .authorized and .limited?"
  • "How do I fetch the most recent 100 photos?"
  • "What are the PHImageRequestOptions delivery modes?"
  • "How do I save a deferred photo proxy to the library?"
  • "What properties does PHAsset have?"

What's Covered

  • PHPickerViewController configuration, filters, delegate, and embedded mode (iOS 17+)
  • PhotosPicker styles (presentation, inline, compact), selection behaviors, disabled capabilities, and HDR preservation
  • PhotosPickerItem loading with Transferable and custom transfer representations
  • PHPhotoLibrary authorization statuses, access levels (.readWrite, .addOnly), and limited library picker
  • PHAsset properties, media types, subtypes, and fetch options
  • PHAssetCreationRequest from UIImage, file URL, and deferred photo proxy (iOS 17+)
  • PHFetchResult access patterns and enumeration
  • PHImageManager image/video requests, delivery modes, and secondary degraded images (iOS 17+)
  • PHChange handling with incremental updates for collection views

Documentation Scope

This page documents the axiom-photo-library-ref skill. It provides complete API documentation for PhotoKit classes and photo picker views. For guided implementation patterns, use the discipline skill.

Key APIs

PHAuthorizationStatus

StatusDescription
.notDeterminedUser hasn't been asked
.restrictedParental controls limit access
.deniedUser denied access
.authorizedFull access granted
.limitedAccess to user-selected photos only (iOS 14+)

PhotosPicker Styles (iOS 17+)

StyleDescription
.presentationModal sheet (default)
.inlineEmbedded in view hierarchy
.compactSingle row, minimal vertical space

PHImageManager Delivery Modes

ModeDescription
.opportunisticFast thumbnail, then high quality
.highQualityFormatOnly high quality
.fastFormatOnly fast/degraded

PHAsset Media Types

TypeDescription
.imagePhotos, screenshots, Live Photos
.videoVideos, slo-mo, cinematic, timelapse
.audioAudio recordings

Resources

Docs: /photosui/phpickerviewcontroller, /photosui/photospicker, /photos/phphotolibrary, /photos/phasset, /photos/phimagemanager

Released under the MIT License