diff --git a/src/ios/CDVCamera.m b/src/ios/CDVCamera.m index 1fae2e29f..51b75d656 100644 --- a/src/ios/CDVCamera.m +++ b/src/ios/CDVCamera.m @@ -78,7 +78,12 @@ + (instancetype) createFromTakePictureArguments:(CDVInvokedUrlCommand*)command pictureOptions.mediaType = [[command argumentAtIndex:6 withDefault:@(MediaTypePicture)] unsignedIntegerValue]; pictureOptions.allowsEditing = [[command argumentAtIndex:7 withDefault:@(NO)] boolValue]; pictureOptions.correctOrientation = [[command argumentAtIndex:8 withDefault:@(NO)] boolValue]; - pictureOptions.saveToPhotoAlbum = [[command argumentAtIndex:9 withDefault:@(NO)] boolValue]; + if (pictureOptions.sourceType == UIImagePickerControllerSourceTypePhotoLibrary) { + pictureOptions.saveToPhotoAlbum = NO; + } + else { + pictureOptions.saveToPhotoAlbum = [[command argumentAtIndex:9 withDefault:@(NO)] boolValue]; + } pictureOptions.popoverOptions = [command argumentAtIndex:10 withDefault:nil]; pictureOptions.cameraDirection = [[command argumentAtIndex:11 withDefault:@(UIImagePickerControllerCameraDeviceRear)] unsignedIntegerValue];