CustomAlbum automatically saves Image or Movie to app-specific album in Photos.
Select Xcode menu File > Swift Packages > Add Package Dependency... and enter repository URL with GUI.
Repository: https://github.com/mtfum/CustomAlbum
Add the following to your Podfile
pod 'CustomAlbum'
Add the following to your Cartfile
github "mtfum/CustomAlbum"
Before using, you need to allow NSPhotoLibraryUsageDescription
in info.plist
CustomAlbum.shared.save(image) { result in
switch result {
case .success(let asset):
// do something
case .failure(let error):
// do something
}
}
There are no tests yet. I'm waiting for your PR!
Developed by @mtfum.
Contact me by Twitter @mtfum
CustomAlbum is licensed under the MIT License. See the LICENSE file for more information.