I have found a package called react-native-permissions which gives most of the permissions in Android and iOS. Currently it is not supporting Storage permission in iOS. How can I request iOS storage permission in react native?
So to ask permissions, React Native has a prebuilt feature in it which we can import and use it in our code. import { PermissionsAndroid } from 'react-native'; Before asking permissions to the user we have to declare that permissions in AndroidManifest. xml file.
From the Settings app, tap Privacy to see all the permissions available on your phone. Tap on any entry to see the apps granted those permissions. Disable any unneeded permissions.
In iOS, the user must explicitly grant permission for each app to access the camera and microphone. Before your app can use the capture system for the first time, the operating system shows an alert asking the user to grant your app access to the camera.
You need to add the following fields in your plist.
<key>NSPhotoLibraryAddUsageDescription</key>
<string>*your app name* would like to save photos from the app to your gallery</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>*your app name* would like to access your photo gallery for uploading images to the app</string>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With