Hello. I have an app that is on expoKit 35 and I am trying to update it to sdk 36. The thing is I that I’m not able to ask the user permission to use the camera. I always get the error:
Error: Unrecognized permission: camera
at Object.fn [as callMethod] (NativeModules.js:99)
at _callee$ (NativeModulesProxy.js:15)
at tryCatch (runtime.js:45)
at Generator.invoke [as _invoke] (runtime.js:271)
at Generator.prototype.<computed> [as next] (runtime.js:97)
at tryCatch (runtime.js:45)
at invoke (runtime.js:135)
at runtime.js:170
at tryCallTwo (core.js:45)
at doResolve (core.js:200)
I don’t know what’s wrong, since it was working until sdk 35. I looked at the documentation but it doesn’t give any special recommendation to deal with this permission.
Here is my app.json
{
"expo": {
"name": "BaladAPP - Produtor",
"description": "Aplicativo para os Produtores de eventos do BaladAPP",
"slug": "produtor-reactnative",
"privacy": "public",
"sdkVersion": "36.0.0",
"platforms": [
"ios",
"android"
],
"version": "1.3.5",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "cover"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"buildNumber": "11",
"bundleIdentifier": "...,
"supportsTablet": true,
"icon": "./assets/icon.png",
"infoPlist": {
"NSCameraUsageDescription": "Este app utiliza a câmera para escanear ingressos de eventos.",
"NSFaceIDUsageDescription": "Utilizamos o FaceID para efetuar login."
},
"publishBundlePath": "ios/baladapp---produtor/Supporting/shell-app.bundle",
"publishManifestPath": "ios/baladapp---produtor/Supporting/shell-app-manifest.json"
},
"android": {
"versionCode": 11,
"icon": "./assets/icon.png",
"package": "....",
"permissions": [
"CAMERA",
"READ_EXTERNAL_STORAGE",
"WRITE_EXTERNAL_STORAGE",
"USE_FINGERPRINT",
"USE_BIOMETRIC"
],
"publishBundlePath": "android/app/src/main/assets/shell-app.bundle",
"publishManifestPath": "android/app/src/main/assets/shell-app-manifest.json"
},
"hooks": {
"postPublish": [
{
"file": "sentry-expo/upload-sourcemaps",
"config": {
"organization": "sentry",
"project": "..",
"authToken": "..",
"url": "..."
}
}
]
},
"isDetached": true,
"detach": {
"iosExpoViewUrl": "...",
"androidExpoViewUrl": "..."
},
"scheme": "...."
}
}
And my package.json
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject"
},
"dependencies": {
"axios": "^0.18.0",
"crypto-js": "^3.1.9-1",
"date-fns": "^1.30.1",
"expo": "^36.0.0",
"expo-ads-facebook": "~8.0.0",
"expo-asset": "~8.0.0",
"expo-av": "~8.0.0",
"expo-blur": "~8.0.0",
"expo-constants": "~8.0.0",
"expo-file-system": "~8.0.0",
"expo-font": "~8.0.0",
"expo-local-authentication": "~8.0.0",
"expo-permissions": "~8.0.0",
"expo-secure-store": "~8.0.0",
"expokit": "^36.0.0",
"lodash": "^4.17.11",
"prop-types": "^15.6.2",
"react": "16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz",
"react-native-camera": "git+https://github.com/otaviogaiao/react-native-camera",
"react-native-expo-image-cache": "git+https://github.com/otaviogaiao/react-native-expo-image-cache.git#4.0.0",
"react-native-gesture-handler": "~1.5.0",
"react-native-iphone-x-helper": "^1.2.0",
"react-native-keyboard-aware-scroll-view": "^0.8.0",
"react-native-masked-text": "^1.10.1",
"react-native-modal": "^11.0.0",
"react-native-optimized-flatlist": "git+https://github.com/otaviogaiao/react-native-optimized-flatlist.git#v1.2.0",
"react-native-picker-select": "^6.1.0",
"react-native-reanimated": "~1.4.0",
"react-native-render-html": "^4.1.2",
"react-native-responsive-screen": "^1.2.0",
"react-native-root-siblings": "^3.1.7",
"react-native-status-bar-height": "^2.2.0",
"react-native-svg": "9.13.3",
"react-navigation": "^3.9.1",
"react-redux": "^6.0.0",
"redux": "^4.0.1",
"redux-logger": "^3.0.6",
"redux-persist": "^5.10.0",
"redux-saga": "^0.16.2",
"sentry-expo": "~2.0.0"
},
"devDependencies": {
"@babel/core": "^7.0.0-0",
"babel-eslint": "^10.0.1",
"babel-preset-expo": "^8.0.0",
"eslint": "^5.12.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-config-prettier": "^3.5.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-react": "^7.12.4",
"prettier": "^1.15.3",
"prettier-eslint": "^8.8.2",
"react-native-unimodules": "0.7.0"
},
"private": true
}
Any help is appreciated.