Use the ALAssetsLibrary
, then you can call writeImageToSavedPhotosAlbum:metadata:completionBlock:
to save the image and in the completion block you get the assetURL
. This can later be used to get the image back from the library.
Docs are here .
To get the image for the asset url:
[self.assetsLibrary assetForURL:imageURL resultBlock:^(ALAsset *asset) {
if (asset != nil) {
imageView.image = [UIImage imageWithCGImage:[[asset defaultRepresentation] fullScreenImage]];
}
} failureBlock:^(NSError * error) {
NSLog (@"Error getting image asset: %@", error);
}];