Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

214
Visualizações
How do we get Background Location Permissions in Expo SDK 42+?

I have a React-Native/Expo managed workflow app where I need to track a user's position when the app is running in the background.

I have successfully requested and received the user's foreground location, but the next page where the user has their background location permission requested I receive 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('Permission to access background location was denied')
              return;
            }
          let backgroundLocation = await Location.getBackgroundPositionAsync({});
          setBackgroundLocation(backgroundLocation);
        }


   getBackgroundLocationAsync()
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

The error tells exactly what you need to do : add NSLocation property in your package.json in ios.infoPlist. You'd also need to add UIBackgroundMode.

You can see the full documentation here : https://docs.expo.dev/versions/latest/sdk/location/#configuration

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda