Kjuly / ALAssetsLibrary-CustomPhotoAlbum

A nice ALAssetsLibrary category for saving images & videos into custom photo album.
http://www.touch-code-magazine.com/ios5-saving-photos-in-custom-photo-album-category-for-download/
MIT License
405 stars 101 forks source link

Not saving images in iOS 10 #47

Closed nitishmakhija closed 7 years ago

nitishmakhija commented 7 years ago

The method - (void)saveImage:(UIImage *)image toAlbum:(NSString *)albumName completion:(ALAssetsLibraryWriteImageCompletionBlock)completion failure (ALAssetsLibraryAccessFailureBlock)failure; doesn't save images to photos

Kjuly commented 7 years ago

Hi @nitishmakhija , it should works in iOS 10.0+, i just tried. Can u provide more info, like which lib version u used. Or u can try the latest repo (v1.3.3: https://github.com/Kjuly/ALAssetsLibrary-CustomPhotoAlbum/releases/tag/1.3.3)?

nitishmakhija commented 7 years ago

Sure and sorry for the late reply - (void)writeImageToSavedPhotosAlbum:(CGImageRef)imageRef orientation:(ALAssetOrientation)orientation completionBlock:(ALAssetsLibraryWriteImageCompletionBlock)completionBlock; is deprecated in iOS 10 as apple introduced PHPhotoLibrary instead of ALAssetsLibrary and introduced the singleton pattern in PHPhotoLibrary below is the documentation link

https://developer.apple.com/reference/assetslibrary/alassetslibrary?language=objc

Kjuly commented 7 years ago

@nitishmakhija yeah, this lib has already handled the case that when ALAssetsLibary not available. Have u import Photos.framework into ur project? If not, importing it to ur project should solve the issue.

Btw, i suggest that just use the new Photos framework, it's convenient, though not support earlier versions (< 9).

nitishmakhija commented 7 years ago

@Kjuly okay thank you for support but if you want i can contribute just let me know, i am closing this issue