Unexpected location permissions after declining initial permission dialogue

SDK Version: 35
Platforms: iOS 12.4.4 (others untested)
__

Hi all,
I’m getting unexpected results for Location Permissions if I decline the initial dialogue. Here are the results of Permissions.getAsync when this is the case:

(after initial decline) When set to “Never” in Settings:

{
  "expires": "never",
  "permissions": Object {
    "location": Object {
      "expires": "never",
      "ios": Object {
        "scope": "none",
      },
      "status": "denied",
    },
  },
  "status": "denied",
}

(after initial decline) When set to “When in Use” in Settings:

{
  "expires": "never",
  "permissions": Object {
    "location": Object {
      "expires": "never",
      "ios": Object {
        "scope": "whenInUse",
      },
      "status": "denied",
    },
  },
  "status": "denied",
}

Note how “status” stays “denied”. If I try to proceed anyway, when “scope” is “whenInUse” but “status” is “denied”, I get:
ERROR getting location: LOCATION permission is required to do this operation.

__
However, if I (after uninstalling + reinstalling Expo) accept the location permissions in the initial dialogue, everything works as expected when changing the permission in Settings:

(after initial accept) When set to “Never” in Settings

{
  "expires": "never",
  "permissions": Object {
    "location": Object {
      "expires": "never",
      "ios": Object {
        "scope": "none",
      },
      "status": "denied",
    },
  },
  "status": "denied",
}

(after initial accept) When set to “When in Use” in Settings

{
  "expires": "never",
  "permissions": Object {
    "location": Object {
      "expires": "never",
      "ios": Object {
        "scope": "whenInUse",
      },
      "status": "granted",
    },
  },
  "status": "granted",
}

Is this a bug in expo? Any ideas how to work around this?

Thanks,
Digl

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.