You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2014/09/04 01:15:09 UTC
git commit: CB-6911 - Geolocation fails in iOS 8
Repository: cordova-plugin-geolocation
Updated Branches:
refs/heads/master d794292fc -> 1c18ea079
CB-6911 - Geolocation fails in iOS 8
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/commit/1c18ea07
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/tree/1c18ea07
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/diff/1c18ea07
Branch: refs/heads/master
Commit: 1c18ea07948775b5b1b4e2d964836b757fc21fd9
Parents: d794292
Author: Shazron Abdullah <sh...@apache.org>
Authored: Wed Sep 3 16:15:05 2014 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Wed Sep 3 16:15:05 2014 -0700
----------------------------------------------------------------------
plugin.xml | 5 +++++
src/ios/CDVLocation.m | 5 +++++
2 files changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/1c18ea07/plugin.xml
----------------------------------------------------------------------
diff --git a/plugin.xml b/plugin.xml
index d8788d6..8a9b90b 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -105,6 +105,11 @@ xmlns:android="http://schemas.android.com/apk/res/android"
<header-file src="src/ios/CDVLocation.h" />
<source-file src="src/ios/CDVLocation.m" />
<framework src="CoreLocation.framework" />
+
+ <config-file target="*-Info.plist" parent="NSLocationWhenInUseUsageDescription">
+ <string></string>
+ </config-file>
+
</platform>
<!-- blackberry10 -->
http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/1c18ea07/src/ios/CDVLocation.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVLocation.m b/src/ios/CDVLocation.m
index f6f47a2..ffb9714 100644
--- a/src/ios/CDVLocation.m
+++ b/src/ios/CDVLocation.m
@@ -122,6 +122,11 @@
// first stop, and then start the updating to ensure we get at least one
// update, even if our location did not change.
[self.locationManager stopUpdatingLocation];
+
+ if (IsAtLeastiOSVersion(@"8.0")) {
+ [self.locationManager performSelector:NSSelectorFromString(@"requestWhenInUseAuthorization") withObject:nil afterDelay:0];
+ }
+
[self.locationManager startUpdatingLocation];
__locationStarted = YES;
if (enableHighAccuracy) {