React Native permissions generator

React Native location while in use permission

Reading the device's position while the app is open is foreground location. Android splits precision into ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION and expects an app to declare both so the user can choose approximate location; iOS asks for NSLocationWhenInUseUsageDescription and shows it in the prompt.

expo-location declares both platforms through its config plugin and requestForegroundPermissionsAsync performs the runtime ask. Request it at the moment the feature is used, not on launch — both stores treat an unexplained location prompt on first open as a reason to reject.

Location while in use at a glance

Android grants
android.permission.ACCESS_FINE_LOCATION android.permission.ACCESS_COARSE_LOCATION
iOS Info.plist key
NSLocationWhenInUseUsageDescription
Expo package
expo-location
Config plugin
expo-location
What it enables
Read the device's position while the app is open.
What the user agrees to
Access your precise location while using the app

The declarations, for Expo and the bare workflow

Expo config

app.json
{
  "expo": {
    "ios": {
      "infoPlist": {
        "NSLocationWhenInUseUsageDescription": "TODO: say why this app needs location — App Review rejects a missing or boilerplate reason."
      }
    },
    "android": {
      "permissions": [
        "android.permission.ACCESS_COARSE_LOCATION",
        "android.permission.ACCESS_FINE_LOCATION"
      ]
    },
    "plugins": [
      "expo-router",
      "expo-location"
    ]
  }
}

Prebuild writes these into the native projects; the config plugin is what makes the package's native code part of the build.

Bare workflow, Android

android/app/src/main/AndroidManifest.xml
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

Bare workflow, iOS

ios/<App>/Info.plist
<key>NSLocationWhenInUseUsageDescription</key>
<string>TODO: say why this app needs location — App Review rejects a missing or boilerplate reason.</string>

The TODO is deliberate: the usage description is shown in the consent prompt and App Review rejects boilerplate.

Install the library

terminal
npx expo install expo-location

Location while in use permission, answered

The longer version is in the guide React Native permissions that satisfy both stores.

What permission does React Native need for location while in use?
On Android, declare android.permission.ACCESS_FINE_LOCATION and android.permission.ACCESS_COARSE_LOCATION in AndroidManifest.xml (or expo.android.permissions in app.json). On iOS, add NSLocationWhenInUseUsageDescription to Info.plist (or expo.ios.infoPlist) with a sentence explaining why — the user reads it in the consent prompt. expo-location exposes the runtime request.
Do I still have to request location while in use at runtime?
Yes. The declaration only makes the request possible. The first time the feature is used, call the request API from expo-location; the operating system shows the prompt ("Access your precise location while using the app") and remembers the answer. A declared but never requested permission does nothing, and a requested but never declared one fails.
Why was my app rejected over the location while in use permission?
Most often the NSLocationWhenInUseUsageDescription string: App Review rejects a missing one at once and a vague or boilerplate one frequently. Write what the app does with the data in your own words. Google Play reviews the declaration against the app's visible features, so a grant no screen uses is also a finding.

Declare every feature the app uses

The React Native permissions generator builds the complete set from the same catalogue — tick each device feature and copy the paired Android grants and iOS usage descriptions, the Expo app.json fragment and the install line together. In the Nodlume workspace the declarations come from the screens themselves: a screen that uses the camera is what adds the camera permission to the Expo Router project it exports.

Open the generator

Other React Native permissions

We'd like to use Google cookies to understand how Nodlume is used and to measure our advertising. Nothing loads until you choose, and declining does not affect anything in the app.