3342
Views
16
Comments
[Location Plugin] Plugin Rejected by Apple.
Question
Forge component by OutSystems R&D
28
Published on 09 Dec 2020

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.


Davidk
Rank: #0

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.

Rank: #12913

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?


Staff
Rank: #313

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

Rank: #12913

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,


Staff
Rank: #313

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

Davidk
Rank: #0

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.

Staff
Rank: #313

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

Rank: #23188

I might be missing something here but where is that config.xml and how is it created in Outsystems? And how can I change a plugin so that custom messages are shown from the extensibility configuration?

Hi Wendy,

The config.xml can be found in the plugin which is located in the git repo. There is a problem with the latest update of this plugin.

In the config.xml should be a variable implemented to set the correct text from your OS plugin, but that one is missing in the version updatet in December 2020.

Rank: #23188

Actually, there is a plugin.xml in the git repo, but no config.xml. How is it created? Is that something MABS does? And if so, how can we add variables to it?

Rank: #116

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?

Staff
Rank: #313

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

Rank: #27041

Hi all,

I recently have encountered this rejection for our application. 

I had a question though with this proposed solution. We use the plugin across a number of applications and the guidance from apple seems to be they want the message to contextually make sense for the app. So if one app uses camera for a selfie, vs another app using camera for taking images for photo evidence then we need to make that clear in the message.


Is there a way this message can be customised from application to application without needing us to duplicate the plugin mutliple times?

Thanks,

Jonathon

Staff
Rank: #313

Jonathon Prosper wrote:

Hi all,

I recently have encountered this rejection for our application. 

I had a question though with this proposed solution. We use the plugin across a number of applications and the guidance from apple seems to be they want the message to contextually make sense for the app. So if one app uses camera for a selfie, vs another app using camera for taking images for photo evidence then we need to make that clear in the message.


Is there a way this message can be customised from application to application without needing us to duplicate the plugin mutliple times?

Thanks,

Jonathon

Hello, Jonathon,

Well, not at the moment, unfortunately. But this related idea was already marked as "on the radar". Would you drop over and let us know that this is something you would be interested in?

Thanks in advance and best regards,

Carlos Simões

Hi!

I added the variable to the plugin, but it keeps giving the default Apple dialog, is there something changed? My config:
{
    "plugin":
    {
        "url": "https://github.com/OutSystems/cordova-plugin-geolocation.git#2.4.1",

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

Rank: #1510

Hi Martin!

In some cases there are several plugins that record different messages for the same description.

see this example:

https://github.com/si27645/cordova-diagnostic-plugin/blob/master/plugin.xml


This plugin records some descriptions without them being clearly defined by us in the Extensibility Configurations.

So, check all your plugins and set your message.


In addition you can change your plugins so that they receive the description as input variable parameter.


Regards,