Releases: crelies/Media
New APIs & Improved SwiftUI views
🎁 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 newPHPicker
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 aSwiftUI.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 toEquatable
andHashable
-
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)
New property wrapper & improvements
Features
- Added new
FetchAllAssets
property wrapper
Improvements
- Added
macOS
support to thePhoto.save
API
Bugfixes
Album
: Fetched assets are now correctly limited to the specific album
⚡ Swift 5.3 & latest OS support
Improvements
Migration to Swift 5.3
SwiftUI
- Implemented PHPicker view
Bugfixes
- Bugfixes & refactoring related to latest OS updates
Fixed SwiftUI camera views
Bugfixes
- Fixed a critical bug where no result was returned when capturing or selecting a photo