npx expo -v 0.7.3, eas-cli -v 3.16.0
react-native-permissions -v ^3.8.4
Requesting Location permissions on iOS Simulator Build, trying to run it locally on my Mac
On startup after deploying an eas cloud ios simulator build it immediately errors:
No permission handler detected.
Check that you added at least one permission handler in your package.json reactNativePermissionsIOS config.
Hello! I am attempting to get my first eas build, a weather app that uses location services on an ios simulator build created in the eas cloud, running locally. The process seems to work and I install it on my iOS 16.4 simulator but it immediately errors.
I have checked and the NSLocationAlwaysAndWhenInUseUsageDescription
key is in the info.plist that’s output from the build.
Here is a snippet of my app.json
"plugins": [
[
"expo-location",
{
"locationAlwaysAndWhenInUsePermission": "Allow $(PRODUCT_NAME) to use your location."
}
]
],
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.jonlind",
"infoPlist": {
"NSLocationAlwaysAndWhenInUseUsageDescription": "This app uses the user's location to send notifications about weather nearby."
}
},
After much hunting and people casually referencing “add reactNativePermissionsIOS array to your package.json” I added this to my package.json manually. Here is a snippet of my package.json
"reactNativePermissionsIOS": [
"LocationAccuracy",
"LocationAlways",
"LocationWhenInUse"
],
"devDependencies": { ... },
"private" : true,
}
No matter what I do it immediately errors out when I run it. I was surprised that there wasn’t a whole lot on this topic. There is an XKCD comic about how lonely it feels when it turns out you and denvercoder are apparently the only ones experiencing this problem!