React Native permissions generator

React Native location in the background permission

Background location is the strictest permission an ordinary app can ask for. Android gates it behind ACCESS_BACKGROUND_LOCATION, which can only be requested after foreground location is already granted and which sends the user to a system settings screen; iOS uses NSLocationAlwaysAndWhenInUseUsageDescription and shows a separate prompt later, once the app has used location for a while.

Both stores ask for a justification in the review notes, and Google Play requires a policy declaration for the grant. Declare it only for a feature the user can see running — a fitness track, a geofenced reminder — and never as a convenience upgrade of the foreground grant.

Location in the background at a glance

Android grants
android.permission.ACCESS_BACKGROUND_LOCATION
iOS Info.plist key
NSLocationAlwaysAndWhenInUseUsageDescription
Expo package
expo-location
Config plugin
expo-location
What it enables
Keep reading position after the app is backgrounded — geofencing, trip tracking.
What the user agrees to
Access your location even when the app is closed

The declarations, for Expo and the bare workflow

Expo config

app.json
{
  "expo": {
    "ios": {
      "infoPlist": {
        "NSLocationAlwaysAndWhenInUseUsageDescription": "TODO: why this app needs location while it is not open."
      }
    },
    "android": {
      "permissions": [
        "android.permission.ACCESS_BACKGROUND_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_BACKGROUND_LOCATION" />

Bare workflow, iOS

ios/<App>/Info.plist
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>TODO: why this app needs location while it is not open.</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 in the background permission, answered

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

What permission does React Native need for location in the background?
On Android, declare android.permission.ACCESS_BACKGROUND_LOCATION in AndroidManifest.xml (or expo.android.permissions in app.json). On iOS, add NSLocationAlwaysAndWhenInUseUsageDescription 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 in the background 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 location even when the app is closed") 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 in the background permission?
Most often the NSLocationAlwaysAndWhenInUseUsageDescription 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.