photokit
Safe Rust bindings for Apple's Photos framework on macOS.
Status: v0.1.0 covers practical
PHPhotoLibrary,PHAsset,PHFetchResult,PHAssetCollection,PHFetchOptions,PHImageManager,PHCachingImageManager,PHAssetResource, change observers, and cancellable image/data requests.
Quick start
use *;
Highlights
PHPhotoLibrary::authorization_status,request_authorization,register_change_observerPHFetchOptionswith predicate, sort descriptors, and fetch limitsPHAssetsnapshots for dates, size, location, media type/subtypes, duration, and favorite statePHImageManager/PHCachingImageManagerwith cancellable request handles for image, image-data, and basic live-photo lookupsPHAssetResource::for_assetfor original filename / resource metadataPHFetchResult<T>convenience wrapper withlen,iter, andfirst
Authorization
The smoke example never prompts for Photos access. It reports the current authorization state and only performs non-interactive library queries.
Smoke example
Run the framework smoke test with:
Expected success footer:
✅ photokit OK
License
Licensed under either of Apache-2.0 or MIT at your option.