cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Peterson (JIRA)" <>
Subject [jira] [Created] (CB-8826) cordova-plugin-geolocation should reverse permissions request in ios8
Date Wed, 08 Apr 2015 18:44:12 GMT
Jason Peterson created CB-8826:

             Summary: cordova-plugin-geolocation should reverse permissions request in ios8
                 Key: CB-8826
             Project: Apache Cordova
          Issue Type: Bug
          Components: iOS, Plugin Geolocation
    Affects Versions: 3.4.0
            Reporter: Jason Peterson
            Priority: Minor
             Fix For: Master

I would like to suggest a change to how the geolocation plugin requests
permissions in iOS8.  In the event that both iOS8 NSLocation usage
permissions exist, I suggest that we first request the least permissive one

This should amount to simply reversing the logic in CDVLocation.m:

if([[NSBundle mainBundle]
            [self.locationManager  requestWhenInUseAuthorization];
} else if([[NSBundle mainBundle] objectForInfoDictionaryKey:@
"NSLocationAlwaysUsageDescription"]) {
            [self.locationManager requestAlwaysAuthorization];

I have a use case where an app launches with both descriptions set, but
depending on client configuration the "AlwaysInUse" permission may not be necessary.  As the
logic is written now, the plugin will always request that one, which could look a bit extreme
to the end user.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message