cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-8826) cordova-plugin-geolocation should reverse permissions request in ios8
Date Wed, 22 Jul 2015 19:53:04 GMT

    [ https://issues.apache.org/jira/browse/CB-8826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14637514#comment-14637514
] 

ASF GitHub Bot commented on CB-8826:
------------------------------------

GitHub user msokk opened a pull request:

    https://github.com/apache/cordova-plugin-geolocation/pull/46

    CB-8826 [iOS 8+] Request WhenInUse permission before Always permission

    First reported here: https://issues.apache.org/jira/browse/CB-8826
    
    Currently the plugin asks for background location first if `NSLocationAlwaysUsageDescription`
is in place along with `NSLocationWhenInUseUsageDescription`. Given the current plugin functionality,
this is unnecessary and privacy wise disturbing to user.
    
    Apple documentation:
    > Requesting “Always” authorization is discouraged because of the potential negative
impacts to user privacy. You should request this level of authorization only when doing so
offers a genuine benefit to the user.
    
    This commit allows other plugins to request background permission separately.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/msokk/cordova-plugin-geolocation CB-8826

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-geolocation/pull/46.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #46
    
----
commit 8e7ff11b9a97e923c16eb1b8edbb4eeca9eabe13
Author: Mihkel Sokk <mihkelsokk@gmail.com>
Date:   2015-07-22T19:16:43Z

    CB-8826 Check for NSLocationWhenInUseUsageDescription first

----


> cordova-plugin-geolocation should reverse permissions request in ios8
> ---------------------------------------------------------------------
>
>                 Key: CB-8826
>                 URL: https://issues.apache.org/jira/browse/CB-8826
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Geolocation
>    Affects Versions: 3.4.0
>         Environment: iOS
>            Reporter: Jason Peterson
>            Priority: Minor
>              Labels: easyfix
>             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
> (NSLocationWhenInUseUsageDescription).
> This should amount to simply reversing the logic in CDVLocation.m:
> {code}
> if([[NSBundle mainBundle]
> objectForInfoDictionaryKey:@"NSLocationWhenInUseUsageDescription"])
> {
>             [self.locationManager  requestWhenInUseAuthorization];
> } else if([[NSBundle mainBundle] objectForInfoDictionaryKey:@
> "NSLocationAlwaysUsageDescription"]) {
>             [self.locationManager requestAlwaysAuthorization];
> }
> {code}
> 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
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message