Skip to content

Commit

Permalink
CB-7461 - Geolocation fails in Camera plugin in iOS 8
Browse files Browse the repository at this point in the history
  • Loading branch information
shazron authored and Anis Kadri committed Sep 5, 2014
1 parent 5c13940 commit fa30a56
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@
<framework src="AssetsLibrary.framework" />
<framework src="MobileCoreServices.framework" />
<framework src="CoreGraphics.framework" />

<config-file target="*-Info.plist" parent="NSLocationWhenInUseUsageDescription">
<string></string>
</config-file>

</platform>

<!-- blackberry10 -->
Expand Down
3 changes: 3 additions & 0 deletions src/ios/CDVCamera.m
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,9 @@ - (void)imagePickerController:(UIImagePickerController*)picker didFinishPickingM
NSMutableDictionary *EXIFDictionary = [[controllerMetadata objectForKey:(NSString *)kCGImagePropertyExifDictionary]mutableCopy];
if (EXIFDictionary) [self.metadata setObject:EXIFDictionary forKey:(NSString *)kCGImagePropertyExifDictionary];

if (IsAtLeastiOSVersion(@"8.0")) {
[[self locationManager] performSelector:NSSelectorFromString(@"requestWhenInUseAuthorization") withObject:nil afterDelay:0];
}
[[self locationManager] startUpdatingLocation];
return;
}
Expand Down

0 comments on commit fa30a56

Please sign in to comment.