From 3b0538c3b1621ce00c53afa9646ef15c527b0147 Mon Sep 17 00:00:00 2001 From: James Jong Date: Fri, 9 Aug 2013 10:09:42 -0400 Subject: [PATCH] [CB-3482] Allow image metadata to be saved to album on iOS -pass in metadata when saving to album using ALAssetsLibrary --- src/ios/CDVCamera.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ios/CDVCamera.m b/src/ios/CDVCamera.m index ebef288..e0f195f 100644 --- a/src/ios/CDVCamera.m +++ b/src/ios/CDVCamera.m @@ -675,7 +675,8 @@ static NSSet* org_apache_cordova_validArrowDirections; } if (self.pickerController.saveToPhotoAlbum) { - UIImageWriteToSavedPhotosAlbum([UIImage imageWithData:[self data]], nil, nil, nil); + ALAssetsLibrary *library = [ALAssetsLibrary new]; + [library writeImageDataToSavedPhotosAlbum:self.data metadata:self.metadata completionBlock:nil]; } if (self.pickerController.returnType == DestinationTypeFileUri) {