An Expo config plugin for painless setup of `react-native-image-crop-picker`
npm install with-rn-image-crop-pickerExpo config plugin for react-native-image-crop-picker.
This plugin adds the required attributes to the specific files as mentioned in the docs.
InfoPlist:
- NSPhotoLibraryUsageDescription
- NSCameraUsageDescription
- NSMicrophoneUsageDescription
AndroidManifest:
Project build.gradle:
- maven { url 'https://maven.google.com' }
- maven { url "https://www.jitpack.io" }
App build.gradle vectorDrawables.useSupportLibrary = true
Currently there is no support for front-camera.
Requires Expo Dev Client in half-managed workflow.
Learn more about:
- Expo Managed Workflow in 2021: part 1, part 2
- Expo dev-client docs
- Expo config plugin
1. Install with Expo
``sh`
$ expo install with-rn-image-crop-picker
2. Check your app.json. It should look like this:
`json`
"plugins": [
"with-rn-image-crop-picker"
],
3. Rebuild your app
`sh`
$ expo prebuild
$ expo run:ios --device
$ expo run:android --device
You can configure the iOS messages by adding the following props to your app.json file:
- PhotoLibraryUsageDescription
- CameraUsageDescription
- MicrophoneUsageDescription
Example:
`json``
"plugins": [
[
"with-rn-image-crop-picker",
{
"PhotoLibraryUsageDescription": "Allow app XYZ to access your photos",
"CameraUsageDescription": "Allow app XYZ to access your camera",
"MicrophoneUsageDescription": "Allow app XYZ to access your microphone"
}
]
]
Contributions are very welcome!
