User location purpose string not being displayed

90 views Asked by At

I built an small react native app using expo/eas, and I am in the process of publishing it to the appstore, but I am being rejected for the following reason:

"We noticed that your app requests the user’s consent to access the location, but doesn’t sufficiently explain the use of the location in the purpose string.

To help users make informed decisions about how their data is used, permission request alerts need to explain and include an example of how your app will use the requested information."

The action I took was to add the purpose string in my App.json file, but for some reason when the app asks for permission to access the user's location, the purpose string it displays it is not the one I have set in my App.json. here is how my "ios" property from App.json looks like:

 "ios": {
    "config":{
        "googleMapsApiKey":"MyGoogleMapsApiKey"
    },
    "supportsTablet": false,
    "icon": "./assets/icon.png",
    "bundleIdentifier": "com.goethedeveloper.apprecuerdos",
    "infoPlist": {
        "NSLocationAlwaysAndWhenInUseUsageDescription": "AppRecuerdos uses your real-time location only to detect the checkpoint you are in.",
        "NSLocationUsageDescription": "AppRecuerdos uses your real-time location only to detect the checkpoint you are in."
    },
    "buildNumber": "12"
  },

I hope someone can help me, kind regards:

ps: here is a screenshot of how the consent screen looks like: enter image description here

1

There are 1 answers

0
Juan Requena On

You need use:

"infoPlist": 
{
        "UIBackgroundModes": [
          "location"
        ],

        "NSLocationAlwaysAndWhenInUseUsageDescription": "this app need access for xxxxxxx",

        "NSLocationWhenInUseUsageDescription": "this app need access for xxxxxxx",

        "NSLocationAlwaysUsageDescription": "this app need access for xxxxxxx"
      }