I am trying to add React native vision camera library with expo, I am currently using EAS for builds. I added react-native-vision-camera to package,json and I am requesting the required permissions from the user using the same library… The build works fine on android after running “npx expo prebuild” and creating a development build build however It isn’t working for IOS and it displays the following message after creating the build and trying to run it locally:
“No permission handler detected.
• Check that you added at least one permission handler in your package.json reactNativePermissionsIOS config.
• Uninstall this app, reinstall your Pods, delete your Xcode DerivedData folder and rebuild it.”
I tried updating info.plist file to add all permissions and rebuilt the project but I am still getting same error message
please let me know the cause of this error as well as what steps can be taken to solve it
I assume you have something like this in your plugins section in app.json?
"cameraPermissionText": "$(PRODUCT_NAME) needs access to your Camera.",
// optionally, if you want to record audio:
"microphonePermissionText": "$(PRODUCT_NAME) needs access to your Microphone."
I’ve only had a brief look, but it might conflict with the way Expo and its config plugins do things. You might be able to get it to work by calling npx react-native setup-ios-permissions in a build hook or something like that.
Otherwise, you will need to run npx expo prebuild and then continue with the Bare workflow. Or else, replace react-native-permissions with something else.