How to add location to your Expo app, in short
You add location to an Expo app with one package: expo-location. Install it, set the permission message iOS shows to the user, ask for foreground permission at the moment the user taps a feature that needs location, then call getCurrentPositionAsync for a one-time reading or watchPositionAsync for live updates. The result is a LocationObject with coords.latitude, coords.longitude, coords.accuracy and a timestamp.
The API is small. What trips people up is everything around it: asking for "Always" access when "While Using" would do, asking on launch with no context, using the highest accuracy for a feature that only needs the city, and switching on background location that then has to be justified to two separate review teams. This guide is built around avoiding those.
Step 1: Install expo-location and set the usage message
Install the package with the Expo installer so the version matches your SDK, then register its config plugin in app.json or app.config.js. The plugin writes the iOS usage descriptions, the sentence iOS shows in the permission prompt. Those strings live in the native binary, so changing them needs a new build, not an over-the-air update.
- Run: npx expo install expo-location
- In app.json, add to the plugins array: ["expo-location", { "locationWhenInUsePermission": "Allow $(PRODUCT_NAME) to use your location to show coffee shops near you." }]
- locationWhenInUsePermission sets NSLocationWhenInUseUsageDescription. locationAlwaysAndWhenInUsePermission sets NSLocationAlwaysAndWhenInUseUsageDescription, which only matters if you request background access.
- Rebuild with EAS Build so the string is in the binary.
Every one of these options defaults to the generic "Allow $(PRODUCT_NAME) to use your location". Replace it. Apple's guideline 5.1.5 says that if your app uses Location Services you should explain the purpose, and a prompt that names the feature ("to show coffee shops near you") is that explanation at the exact moment the user decides. If you manage the ios folder yourself instead of using Continuous Native Generation, add the keys to Info.plist by hand.
Step 2: Ask for permission at the right moment
Call requestForegroundPermissionsAsync, or use the useForegroundPermissions hook, right when the user taps something that needs location: "Find stores near me", "Use my current location", "Start run". Do not fire it on app launch. A prompt with an obvious reason is one people accept; a cold prompt on the first screen is one people deny, and on iOS a denial is hard to undo.
Fields on the permission response worth checking (per Expo's Location reference)
| Field | What it tells you |
|---|---|
| status | 'granted', 'denied' or 'undetermined'. Only read location when it is 'granted' |
| canAskAgain | false means the system will not show the prompt again. Send the user to Settings instead |
| ios.accuracy | iOS 14+: 'full' for precise location, 'reduced' if the user switched Precise off |
| ios.scope | 'whenInUse', 'always' or 'none' |
| android.accuracy | 'fine' or 'coarse', depending on what the user granted |
Two things to design for. First, users can turn off Precise Location on iOS or pick approximate on Android, so your feature should still do something useful with a rough position. Second, iOS has an "Allow Once" option that grants When In Use access for the current session only, and iOS gives you no way to tell it apart from "While Using the App". Treat permission as something to re-check each session, not a one-time flag you store.
Location services can also be switched off for the whole device. hasServicesEnabledAsync tells you, so you can show "Turn on Location Services in Settings" instead of a spinner that never resolves. The full permission pattern, including the Settings fallback, is in [how to request permissions in your Expo app](/blog/how-to-request-permissions-in-your-expo-app).
Step 3: Read the location (and pick the right accuracy)
expo-location gives you three ways to read a position. Picking the right one is most of the difference between a location feature that feels instant and one that hangs on a loading state.
Which expo-location call to use
| Call | Use it for |
|---|---|
| getLastKnownPositionAsync | A fast first answer. Returns the cached position, or null if there is none or it does not meet your maxAge or requiredAccuracy. May be out of date |
| getCurrentPositionAsync | A one-time fresh reading. Expo's docs warn it can take several seconds to get a fix, especially indoors |
| watchPositionAsync | Live updates while the app is open: a moving dot on a map, a run tracker. Returns a subscription you must remove |
A pattern that works for most "near me" screens: call getLastKnownPositionAsync and render results straight away if it returns something, then call getCurrentPositionAsync in the background and refresh if the user has moved. The screen feels instant and still ends up correct.
Pass an accuracy option to both calls. Expo's Accuracy enum runs from Lowest (nearest three kilometers) through Low (nearest kilometer), Balanced (within one hundred meters), High (within ten meters) and Highest, up to BestForNavigation. Higher accuracy usually means waiting longer for a fix and using more battery, so pick the lowest level that does the job.
- Weather, local news, currency or region defaults: Low or Lowest.
- Stores, restaurants or events near me: Balanced.
- Run, ride or walk tracking, or turn-by-turn: High, Highest or BestForNavigation, with watchPositionAsync.
Turn coordinates into an address
Latitude and longitude are not something you show a user. reverseGeocodeAsync turns coordinates into a postal address (city, street, region, country and so on), and geocodeAsync goes the other way, from an address string to coordinates. Both work on Android and iOS; on Android you must have requested foreground location permission before geocoding works.
Expo's docs say geocoding is resource-heavy and too many requests at once can return an error. In practice: reverse geocode once when you get a new position, cache the result, and do not call it on every update from watchPositionAsync. If you need search-as-you-type for addresses, that is a job for a places API on your backend, not the device geocoder.
Do you actually need background location?
Probably not. Background location means your app receives location updates while it is not on screen. It is the right tool for a run tracker that keeps recording with the phone locked, a delivery app tracking a driver, or geofencing ("remind me when I get to the store"). It is the wrong tool for anything the user only does with the app open, and that covers most apps.
If you do need it, here is what Expo's docs list as required:
- Set isIosBackgroundLocationEnabled (adds location to UIBackgroundModes) and, for Android, isAndroidBackgroundLocationEnabled in the config plugin, then rebuild.
- Define the task in the top-level scope of your app with TaskManager.defineTask, not inside a component.
- Request foreground permission first, then requestBackgroundPermissionsAsync later when the user turns on the feature. On iOS this is the Always permission; on Android you need both.
- Start updates with startLocationUpdatesAsync, and stop them when the feature is off.
- Test in a development build. Background location is not supported in Expo Go on iOS, and foreground and background services are not available in Expo Go on Android.
Background location also gets reviewed twice. Apple's guideline 2.5.4 says background services may only be used for their intended purposes, so App Review will look for the visible feature that needs it. On Android, Expo's docs note that enabling ACCESS_BACKGROUND_LOCATION or the location foreground service means submitting your app to Google Play for review and requesting access to that permission. Factor that into your launch timeline if you are shipping to both stores; [Apple App Store vs Google Play](/blog/apple-app-store-vs-google-play) covers the wider differences.
What App Review checks for location
Apple's guideline 5.1.5 boils down to three things: only use location when it is directly relevant to what your app does, notify and get consent before you collect, transmit or use location data, and explain the purpose in your app. The same guideline says location APIs should not be used to provide emergency services or autonomous control over vehicles, aircraft and other devices, with narrow exceptions for small devices like lightweight drones and toys.
- The usage message names the feature, not just "this app needs your location".
- The prompt appears in context, after the user taps something location-related.
- Denying location does not lock the user out of features that do not need it.
- If you send location to your server, your App Store privacy details say so. See [App Privacy details in App Store Connect](/blog/app-privacy-details-app-store-connect).
- If background location is on, there is a visible feature that clearly needs it, and the reviewer can find it.
If a review note comes back anyway, [how to pass Apple App Review](/blog/how-to-pass-apple-app-review) covers how to respond without losing a week.
How to test location
expo-location is included in Expo Go, so you can build and test the foreground flow there. Your custom permission message only shows in your own build, and background location needs a development build, so do a final pass in a development build or [TestFlight](/blog/testflight-beta-testing-guide-for-expo-apps). The difference is in [Expo Go vs development build](/blog/expo-go-vs-development-build).
- Simulator and emulator: make sure location is enabled and set a simulated location. In the Android Emulator, Expo's docs suggest turning off Google Location Accuracy if you are not getting updates.
- Deny the prompt, then tap the feature again. You should see your own explanation and a Settings link, not a dead button.
- Turn Precise Location off in iOS Settings and check the feature still works.
- Pick "Allow Once", close the app, reopen it and use the feature again.
- Turn off Location Services for the whole device and check the message you show.
- Leave a watchPositionAsync screen and confirm updates stop.
Have Claude Code build it for you
Open your project in the Claude Code desktop app and give it a spec rather than "add location". A prompt that works:
Add a line to your [CLAUDE.md](/blog/claude-md-for-expo-apps) like "never enable background location without asking me" so a later session does not switch it on to fix an unrelated bug. Then read the permission strings yourself before you build. Claude Code can write them, but you are the one who knows exactly what your app does with someone's location.
The short version
To add location to your Expo app: install expo-location, set locationWhenInUsePermission in its config plugin, ask for foreground permission when the user taps a location feature, then read the position with getLastKnownPositionAsync, getCurrentPositionAsync or watchPositionAsync at the lowest accuracy that works. Handle denied, approximate and Allow Once, and leave background location off unless a visible feature truly needs it.
If you are building your first iOS app with Claude Code and Expo and want someone to look over your permission flow before App Review does, bring it to App Store Launch Club. Members share their builds for feedback, and the [curriculum](/curriculum) covers the full path from first build to first users. Join at applaunchclub.co for $9 a month.
Short, practical drops on app ideas, validating fast, store listings, and passing app review. No spam, unsubscribe anytime.
Frequently asked questions
Does expo-location work in Expo Go?
Yes, for foreground location. Expo's docs list expo-location as included in Expo Go. Background location is not supported in Expo Go on iOS, and foreground and background services are not available in Expo Go on Android, so use a development build for those. Your custom permission message also only appears in your own build.
Why is getCurrentPositionAsync so slow?
It asks the device for a fresh fix, which Expo's docs say can take several seconds, especially indoors and at higher accuracy. Call getLastKnownPositionAsync first for an instant result, use the lowest accuracy that works, and refresh in the background.
What is the difference between foreground and background location permission?
Foreground maps to iOS When In Use and lets you read location while the app is open. Background maps to iOS Always and lets you receive updates when the app is not on screen. Request foreground first; only request background later, when the user turns on a feature that needs it.
How do I know if the user chose Allow Once?
You cannot. Per Expo's docs, iOS reports both Allow Once and Allow While Using the App as When In Use. Allow Once is revoked when the app closes, so check permission each session instead of storing it as a flag.
Will background location get my app rejected?
Not if a visible feature clearly needs it. Apple's guideline 2.5.4 limits background services to their intended purpose, and 5.1.5 says to use location only when directly relevant to your app. On Android, enabling background location means requesting that permission through Google Play's review, per Expo's docs.
How do I get the city name from the user's location?
Call reverseGeocodeAsync with the latitude and longitude. It returns an array of addresses, usually with one entry. Cache the result, because Expo's docs warn that too many geocoding requests at once can cause errors.
How do I stop watchPositionAsync?
It returns a subscription. Keep a reference to it and call subscription.remove() when the screen unmounts or the user stops tracking.
Last reviewed by David on October 11, 2026

