image-crop-picker-expo-plugin
v0.1.6
Published
An Expo config plugin for painless setup of `react-native-image-crop-picker`
Downloads
4
Readme
image-crop-picker-expo-plugin
Expo config plugin for react-native-image-crop-picker.
About
This plugin adds the required attributes to the specific files as mentioned in the docs.
iOS
InfoPlist:
NSPhotoLibraryUsageDescription
NSCameraUsageDescription
NSMicrophoneUsageDescription
Android
AndroidManifest: <uses-permission android:name="android.permission.CAMERA"/>
Project build.gradle:
maven { url 'https://maven.google.com' }
maven { url "https://www.jitpack.io" }
App build.gradle vectorDrawables.useSupportLibrary = true
Important note
Currently there is no full support for front-camera on android.
Usage
- Install with Expo
expo install "image-crop-picker-expo-plugin"
- Check your app.json. It should look like this:
"plugins": [
"image-crop-picker-expo-plugin"
],
- Run prebuild
expo prebuild
expo run:ios --device
expo run:android --device
Configuration
You can configure the iOS messages by adding the following props to your app.json file:
- PhotoLibraryUsageDescription
- CameraUsageDescription
- MicrophoneUsageDescription
Example:
"plugins": [
[
"image-crop-picker-expo-plugin",
{
"PhotoLibraryUsageDescription": "Allow app XYZ to access your photos",
"CameraUsageDescription": "Allow app XYZ to access your camera",
"MicrophoneUsageDescription": "Allow app XYZ to access your microphone"
}
]
]