zoontek / react-native-permissions

An unified permissions API for React Native on iOS, Android and Windows.
MIT License
4.1k stars 836 forks source link

setup_permissions Documentation / clarification #839

Closed sanduluca closed 9 months ago

sanduluca commented 9 months ago

Can you add more info about setup_permissions on iOS? What does the setup_permissions do ? Why do we need it ? Is it mandatory ?

I installed "react-native-permissions": "^4.1.0" and didn't configure setup_permissions and did not imported the react-native-permissions/scripts/setup.rb and I could request Camera permissions on iOS with react-native-permissions. Not sure, but i want to notice the I have installed and other libraries that use camere and can request permissions by themself.

zoontek commented 9 months ago

It edits the podspec file to include additional sources. By default, the native code to check / request specific permissions is not included https://github.com/zoontek/react-native-permissions/blob/731692e4e3207832c0b437393a4c7df33abb0f2e/RNPermissions.podspec#L18

Without this step, requests resolve to UNAVAILABLE

I made a talk about that at React Native EU: https://youtu.be/eaSUaB4if2g?si=XiLf3yyps1_WOOEf