I am creating a mobile app using react native and expo. I am currently using Expo Go to test on iOS. The application uses react-native-maps MapView via expo and the Google maps API to show the user location on a map. As such it requires permission to access user location in the foreground.
The app right now exists only within the App.js file. In the componentDidMount()
I ask for permissions as such:
let { status } = await Location.requestForegroundPermissionsAsync();
When I use expo go to test the app on Android it works as expected, on my first run it asked for permissions and the app ran smoothly.
However, when I use Expo Go to run on iOS I get a prompt to provide permission:
"Experience needs permissions: [app] needs permissions for locationForeground. You've already granted permission to another expo experience. Allow [app] to also use it?"
The prompt has a Deny and Allow button. The problem is that I can not interact with this prompt at all, clicking the buttons has no effect and my app never stops waiting for the foreground permissions request. Eventually, Expo Go crashes and doesn't give me any error information.
Does anyone know why this occurs? I am somewhat new to mobile development so I wouldn't be surprised if I configured something incorrectly for iOS.