react-native-geolocation icon indicating copy to clipboard operation
react-native-geolocation copied to clipboard

iOS - Always permission is not prompted?

Open cristianoccazinsp opened this issue 5 years ago • 2 comments

Environment

System:
    OS: macOS Mojave 10.14.6
    CPU: (4) x64 Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
    Memory: 20.18 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 10.15.3 - /usr/local/bin/node
    npm: 6.13.4 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
    Android SDK:
      API Levels: 28
      Build Tools: 28.0.3
  IDEs:
    Android Studio: 3.4 AI-183.6156.11.34.5522156
    Xcode: 11.2.1/11B53 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.12.0 => 16.12.0 
    react-native: 0.61.5 => 0.61.5 
  npmGlobalPackages:
    create-react-native-app: 2.0.2
    create-react-native-modu

Platforms

iOS

Versions

  • iOS: 13.2.3
  • react-native-geolocation: 2.0.2
  • react-native: 0.61.5
  • react: 16.12.0

Description

I'm using Geolocation.setRNConfiguration({ authorizationLevel: 'always'}); and also NSLocationAlwaysUsageDescription in the plist. However, I'm always getting the while in use prompt instead of always. I have re-installed the app several times to test this, but I'm not sure if a rejection persists through app re-installs or not.

Reproducible Demo

cristianoccazinsp avatar Dec 18 '19 14:12 cristianoccazinsp

I have the same problem, has anyone managed to solve it?

rgazeredo avatar Mar 23 '20 04:03 rgazeredo

This is not a bug with this library. As of iOS 13 the user no longer receives an "Always" option in the initial permission prompt even when requesting the "Always" permission. If you have requested "Always" and the user selects "While using app" on the permission prompt, then the app will actually have the "Always" permission provisionally. However, the user will be re-prompted at some point that the app is using location in the background and ask then ask the user to continue to always allow in background or only while using app. At this point the location permission may change from "Always".

More details here.

0xTomDaniel avatar Mar 24 '20 19:03 0xTomDaniel