Please provide the following:
- SDK Version: 43
- Platforms(Android/iOS/web/all): All
- Add the appropriate “Tag” based on what Expo library you have a question on.
I have a Managed Workflow Expo/RN app where I need my user’s location while the app is running in the background. I have successfully requested ‘Foreground Location’ but in the next page, when I request ‘Background Location’ I get the following warning:
[Unhandled promise rejection: Error: One of the NSLocation*UsageDescription
keys must be present in Info.plist to be able to use geolocation.]
Here is a snippet of the code requesting ‘background location’
async function getBackgroundLocationAsync(){
let {status} = await Location.requestBackgroundPermissionsAsync()
if (status !==‘granted’){
setErrorMsg(‘Background Permission Denied’)
return;
let backgroundLocation = await Location.getBackgroundPositionAsync({});
setBackgroundLocation(backgroundLocation);
}
getBackgroundLocation()