workaround for Issue #778

setting data to nil in line 386 crashes the front end app. Therefore I commented it out.
This is not a perfect solution for the Issue #778 because we want the location data when `CameraUsesGeolocation`  but better not to crash.
This commit is contained in:
Adrian Veith 2023-06-21 17:15:09 +02:00 committed by GitHub
parent 23642f09b5
commit 6845bac9c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;