[Location Plugin] Plugin Rejected by Apple.

[Location Plugin] Plugin Rejected by Apple.

  
Forge Component
(15)
Published on 2016-12-15 by OutSystems R&D
15 votes
Published on 2016-12-15 by OutSystems R&D

Hi

Have a question regarding the plugin, Apple has rejected our binary due to the modal permission popup containing no description.

What's weird is the binary was approved before, we change the image of the app and resubmitted, now now apple decides to reject the binary, there is no consitancy with them. however I am faced with an issue.

Their rejection reason,

Guideline 5.1.1 - Legal - Privacy - Data Collection and Storage

We noticed that your app requests the user’s consent to access the Location but does not clarify the use of this feature in the permission modal alert.


Please see attached screenshots for details.


Next Steps


To resolve this issue, please revise the permission modal alert to specify why the app is requesting access to the Location.


To learn more about requesting the user’s permission to access app features, visit the iOS Human Interface Guidelines.


this is an example of our permission popup for location services on Apple.



Apple wants it to look like this,




So the question is really, how would one add a description to this permission modal popup.

Look forward to your responses.


Leeroy Stander.


I've not gone through this process... and... I'm new to OutSystems.

Is this something you can add to the Extensibility Configurations of the plugin wrapper?  For example, this is from the Camera Plugin...

{
    "plugin":
    {
        "url": "https://github.com/OutSystems/cordova-plugin-camera#2.3.1.OS",
        "variables": [{
            "name": "CAMERA_USAGE_DESCRIPTION",
            "value": "We access your camera to take pictures."
        },
        {
            "name": "PHOTOLIBRARY_USAGE_DESCRIPTION",
            "value": "We access your photo library to load or save pictures."
        }]
    }
}

But I don't know what the variable names should be for Location.

Are you using your own forked version of the actual plugin?  If so, could you change it's config.xml file to include you're own message?

In other environments I can get to the PhoneGap Build config.xml file that is submitted to PhoneGap Build.  In OutSystems I'm not sure this is possible.  PhoneGap Build now allows you to add usage descriptions... e.g.

<config-file platform="ios" parent="NSLocationWhenInUseUsageDescription" mode="replace">
    <string>This is your custom message</string>
</config-file>

All not very helpful... but maybe trigger other replies or thoughts.

Hi found this on the Github repo of this plugin

https://github.com/OutSystems/cordova-plugin-geolocation


they mention this,


iOS Quirks

Since iOS 10 it's mandatory to add a NSLocationWhenInUseUsageDescription entry in the info.plist.

NSLocationWhenInUseUsageDescription describes the reason that the app accesses the user's location. When the system prompts the user to allow access, this string is displayed as part of the dialog box. To add this entry you can pass the variable GEOLOCATION_USAGE_DESCRIPTION on plugin install.

Example:cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION="your usage message""


How would one implement this?


Hello, Leeroy,

Davidk nailed it: the Camera plugin implements this through Cordova variables (e.g. "CAMERA_USAGE_DESCRIPTION"), within its extensibility configurations.

For the Location plugin, this configuration is available via the 'GEOLOCATION_USAGE_DESCRIPTION' parameter, which you could find on the plugin's config.xml file:

For brevity, here's what it would look like on the Location plugin:

{
    "plugin":
    {
        "url": "https://github.com/OutSystems/cordova-plugin-geolocation.git#2.4.1",
        "variables": [{
            "name": "GEOLOCATION_USAGE_DESCRIPTION",
            "value": "We access your camera to take pictures."
        }]
    }
}

Could you try setting your message using a similar set of extensibility configurations and let us know if the permission modal displays it?

Best regards,

Carlos Simões

Hi guys,

Many thanks for your replies. I got it working by adding this to the location plugin.

{
    "plugin":
    {
        "url": "https://github.com/OutSystems/cordova-plugin-geolocation.git#2.4.1",

            "variables": [{
                "name": "GEOLOCATION_USAGE_DESCRIPTION",
                "value": "Your cuurent location will be displayed on the map and used for directions."
            }]
    }
}


Screenshot of how it looks on apple device,


That's great, Leeroy!

Minor note: don't forget to fix the typo on "cuurent" and generate a new build. This text is not updateable by the usual platform upgrade process.

Feel free to get back to us if you have further questions!

Best regards,

Carlos Simões

Excellent... very glad to know that worked out... thanks for posting your results.  And thanks Carlos for supplying the variable details... I couldn't find that anywhere.

Once you know what to look for (parameters/variables) and where to find them (config.xml), you can find them for any plugin.

In this case, I feel a default should've been put up, as done for the other plugins. I will pass on that feedback to the team.

Best regards,

Carlos Simões

Hello guys I try to use this solution but I receive the following message from Apple:


Dear Developer,

We identified one or more issues with a recent delivery for your app, "XXXXX". Please correct the following issues, then upload again.

Missing Info.plist key - This app attempts to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSLocationAlwaysUsageDescription key with a string value explaining to the user how the app uses this data.

Best regards,

The App Store Team


Any one can help me with this?

Hello, Alexandre,

I take it you have the "GEOLOCATION_USAGE_DESCRIPTION" preference set in your mobile app, with a descriptive message, right?

Were you able to successfully submit this app in the past?

Best regards,

Carlos Simões