I need to implement the permissions mechanism for both android and ios.
For that, I am using react-native-permissions@2.0.0 (also: react-native@0.60.6).
When I build the project for android everything is fine. Both in the build process and runtime.
However, when I build the project for IOS, it does completes the build process, but then an error screen appears on the device (I build the app on a real device and not on a simulator).
This is the error:
SyntaxError: /Users/someUser/www/myApp/app/node_modules/react-native-permissions/src/index.ts: Unexpected token (11:59)
10 | const ANDROID = Object.freeze({
11 | ACCEPT_HANDOVER: 'android.permission.ACCEPT_HANDOVER' as const,
There is a similar thread on github: https://github.com/react-native-community/react-native-permissions/issues/335 (it wasn't tagged as an issue yet).
I have tried to downgrade the react native library, upgrade metro-react-native-babel-preset to the latest, but the problem wasn't resolved.