You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2015/10/28 20:40:51 UTC
[1/2] cordova-plugin-geolocation git commit: CB-8826 Check for
NSLocationWhenInUseUsageDescription first
Repository: cordova-plugin-geolocation
Updated Branches:
refs/heads/master 3f0c06368 -> f9dd314b2
CB-8826 Check for NSLocationWhenInUseUsageDescription first
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/8e7ff11b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/tree/8e7ff11b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/diff/8e7ff11b
Branch: refs/heads/master
Commit: 8e7ff11b9a97e923c16eb1b8edbb4eeca9eabe13
Parents: 2397519
Author: Mihkel Sokk <mi...@gmail.com>
Authored: Wed Jul 22 22:16:43 2015 +0300
Committer: Mihkel Sokk <mi...@gmail.com>
Committed: Wed Jul 22 22:40:56 2015 +0300
----------------------------------------------------------------------
src/ios/CDVLocation.m | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/8e7ff11b/src/ios/CDVLocation.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVLocation.m b/src/ios/CDVLocation.m
index 8b543c8..9284246 100644
--- a/src/ios/CDVLocation.m
+++ b/src/ios/CDVLocation.m
@@ -122,17 +122,17 @@
NSUInteger code = [CLLocationManager authorizationStatus];
if (code == kCLAuthorizationStatusNotDetermined && ([self.locationManager respondsToSelector:@selector(requestAlwaysAuthorization)] || [self.locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)])) { //iOS8+
__highAccuracyEnabled = enableHighAccuracy;
- if([[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSLocationAlwaysUsageDescription"]){
- [self.locationManager requestAlwaysAuthorization];
- } else if([[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSLocationWhenInUseUsageDescription"]) {
- [self.locationManager requestWhenInUseAuthorization];
+ if([[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSLocationWhenInUseUsageDescription"]){
+ [self.locationManager requestWhenInUseAuthorization];
+ } else if([[NSBundle mainBundle] objectForInfoDictionaryKey:@"NSLocationAlwaysUsageDescription"]) {
+ [self.locationManager requestAlwaysAuthorization];
} else {
NSLog(@"[Warning] No NSLocationAlwaysUsageDescription or NSLocationWhenInUseUsageDescription key is defined in the Info.plist file.");
}
return;
}
#endif
-
+
// Tell the location manager to start notifying us of location updates. We
// first stop, and then start the updating to ensure we get at least one
// update, even if our location did not change.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[2/2] cordova-plugin-geolocation git commit: Merge branch 'CB-8826'
of https://github.com/msokk/cordova-plugin-geolocation
Posted by pu...@apache.org.
Merge branch 'CB-8826' of https://github.com/msokk/cordova-plugin-geolocation
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/f9dd314b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/tree/f9dd314b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/diff/f9dd314b
Branch: refs/heads/master
Commit: f9dd314b26fe3dfe2bcec2f02e35a5d9519497f8
Parents: 3f0c063 8e7ff11
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Wed Oct 28 12:40:35 2015 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Wed Oct 28 12:40:35 2015 -0700
----------------------------------------------------------------------
src/ios/CDVLocation.m | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org