0.1.0 • Published 1 year ago

with-rn-image-crop-picker_fixed v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

with-rn-image-crop-picker_fixed

Expo config plugin for react-native-image-crop-picker_fixed.

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"/>
  • <uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>

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.

Requires Expo Dev Client in half-managed workflow. Learn more about:

Usage

  1. Install with Expo
$ expo install with-rn-image-crop-picker expo-build-properties
  1. Check your app.json. It should look like this:
 "plugins": [
      "with-rn-image-crop-picker_fixed",
      [
        "expo-build-properties",
	{
          "android": {
            "compileSdkVersion": 33,
            "targetSdkVersion": 33
	  }
	}
      ]
    ],
  1. Rebuild your app
$ expo prebuild
$ expo run:ios --device
$ expo run:android --device

Configuartion

You can configure the iOS messages by adding the following props to your app.json file:

  • PhotoLibraryUsageDescription
  • CameraUsageDescription
  • MicrophoneUsageDescription

Example:

"plugins": [
  [
		"with-rn-image-crop-picker",
		{
			"PhotoLibraryUsageDescription": "Allow app to access your photos",
			"CameraUsageDescription": "Allow app to access your camera",
			"MicrophoneUsageDescription": "Allow app to access your microphone"
		}
	]
]

Contributing

Contributions are very welcome!

0.1.0

1 year ago