mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-04-09 17:43:12 +08:00
CB-11376: (ios): fix CameraUsesGeolocation error
If it's not a camera picture don't use geolocation This closes #226
This commit is contained in:
parent
7e8fe0bae9
commit
c13e9f327b
@ -524,9 +524,11 @@ static NSString* toBase64(NSData* data) {
|
||||
NSString* mediaType = [info objectForKey:UIImagePickerControllerMediaType];
|
||||
if ([mediaType isEqualToString:(NSString*)kUTTypeImage]) {
|
||||
[weakSelf resultForImage:cameraPicker.pictureOptions info:info completion:^(CDVPluginResult* res) {
|
||||
[weakSelf.commandDelegate sendPluginResult:res callbackId:cameraPicker.callbackId];
|
||||
weakSelf.hasPendingOperation = NO;
|
||||
weakSelf.pickerController = nil;
|
||||
if (![self usesGeolocation] || picker.sourceType != UIImagePickerControllerSourceTypeCamera) {
|
||||
[weakSelf.commandDelegate sendPluginResult:res callbackId:cameraPicker.callbackId];
|
||||
weakSelf.hasPendingOperation = NO;
|
||||
weakSelf.pickerController = nil;
|
||||
}
|
||||
}];
|
||||
}
|
||||
else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user