Skip to content

New APIs & Improved SwiftUI views

Latest
Compare
Choose a tag to compare
@crelies crelies released this 04 May 21:45
· 13 commits to master since this release
84acbe8

🎁 New APIs

  • New additional lazy containers for fetching the media assets only on demand
    -- LazyAlbum(s)
    -- LazyAudio(s)
    -- LazyLivePhoto(s)
    -- Media.LazyPhotos
    -- LazyPhoto
    -- LazyVideo(s)

  • Media: Get and request the permission to access the camera (Media.currentCameraPermission, Media.requestCameraPermission(_))

  • Video: Get a preview image for a given point in time (video.previewImage(at:preferredTimescale:_))

  • Photo+SwiftUI: Get a photo view with a desired size (photo.view(targetSize:imageView:))

🎉 Improved SwiftUI views

  • Refactored views for better performance and to get rid of some bugs

  • Media.browser, LivePhoto.browser, Photo.browser & Video.browser now use the new PHPicker with multi selection support under the hood on iOS 14 or macOS 11

  • Camera.view, Media.browser, LivePhoto.camera, LivePhoto.browser, Photo.camera, Photo.browser, Video.camera & Video.browser stop throwing and instead show a SwiftUI.Text if an error occurs during initialization. You can specify a ViewBuilder to show a custom error view.

🚀 Improvements

  • Album, Audio, LivePhoto, Photo & Video now conform to Equatable and Hashable

  • Fixed a threading issue

  • Improvements related to the authorization status API changes from Apple

ℹ️ More

  • Added an example project with some usage examples (was previously managed in a separate git repository)