diff --git a/src/ios/CDVCamera.m b/src/ios/CDVCamera.m index 6793da4..c71a42b 100644 --- a/src/ios/CDVCamera.m +++ b/src/ios/CDVCamera.m @@ -406,7 +406,7 @@ static NSString* toBase64(NSData* data) { } [[self locationManager] startUpdatingLocation]; } - data = nil; + // data = nil; // this causes Issue #778 } } else if (pickerController.sourceType == UIImagePickerControllerSourceTypePhotoLibrary) { PHAsset* asset = [info objectForKey:@"UIImagePickerControllerPHAsset"]; @@ -659,7 +659,7 @@ static NSString* toBase64(NSData* data) { NSString* mediaType = [info objectForKey:UIImagePickerControllerMediaType]; if ([mediaType isEqualToString:(NSString*)kUTTypeImage]) { [weakSelf resultForImage:cameraPicker.pictureOptions info:info completion:^(CDVPluginResult* res) { - if (![self usesGeolocation] || picker.sourceType != UIImagePickerControllerSourceTypeCamera) { + if (![weakSelf usesGeolocation] || picker.sourceType != UIImagePickerControllerSourceTypeCamera) { [weakSelf.commandDelegate sendPluginResult:res callbackId:cameraPicker.callbackId]; weakSelf.hasPendingOperation = NO; weakSelf.pickerController = nil;