cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [07/12] git commit: [CB-3482] Allow image metadata to be saved to album on iOS
Date Wed, 14 Aug 2013 21:37:35 GMT
[CB-3482] Allow image metadata to be saved to album on iOS

-pass in metadata when saving to album using ALAssetsLibrary


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/commit/3b0538c3
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/tree/3b0538c3
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/diff/3b0538c3

Branch: refs/heads/dev
Commit: 3b0538c3b1621ce00c53afa9646ef15c527b0147
Parents: 767e064
Author: James Jong <wjamesjong@gmail.com>
Authored: Fri Aug 9 10:09:42 2013 -0400
Committer: James Jong <wjamesjong@gmail.com>
Committed: Fri Aug 9 10:09:42 2013 -0400

----------------------------------------------------------------------
 src/ios/CDVCamera.m | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-camera/blob/3b0538c3/src/ios/CDVCamera.m
----------------------------------------------------------------------
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) {


Mime
View raw message