Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

with-rn-image-crop-picker

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

with-rn-image-crop-picker - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

LICENSE

16

build/index.js

@@ -5,10 +5,12 @@ "use strict";

const config_plugins_1 = require("@expo/config-plugins");
const withImageCropPicker = (config) => {
const withImageCropPicker = (config, { PhotoLibraryUsageDescription, CameraUsageDescription, MicrophoneUsageDescription, } = {}) => {
const photoDescription = PhotoLibraryUsageDescription ||
"Allow $(PRODUCT_NAME) to access your photo library";
const CameraDescription = CameraUsageDescription || "Allow $(PRODUCT_NAME) to access your camera";
const MicrophoneDescription = MicrophoneUsageDescription ||
"Allow $(PRODUCT_NAME) to access your microphone";
return (0, config_plugins_1.withInfoPlist)(config, (config) => {
config.modResults.NSPhotoLibraryUsageDescription =
"Allow $(PRODUCT_NAME) to access your photo library";
config.modResults.NSCameraUsageDescription =
"Allow $(PRODUCT_NAME) to access your camera";
config.modResults.NSMicrophoneUsageDescription =
"Allow $(PRODUCT_NAME) to access your microphone";
config.modResults.NSPhotoLibraryUsageDescription = photoDescription;
config.modResults.NSCameraUsageDescription = CameraDescription;
config.modResults.NSMicrophoneUsageDescription = MicrophoneDescription;
return config;

@@ -15,0 +17,0 @@ });

import { ConfigPlugin, withInfoPlist } from "@expo/config-plugins";
export const withImageCropPicker: ConfigPlugin<string> = (config) => {
interface PluginProps {
PhotoLibraryUsageDescription?: string;
CameraUsageDescription?: string;
MicrophoneUsageDescription?: string;
}
export const withImageCropPicker: ConfigPlugin<PluginProps> = (
config,
{
PhotoLibraryUsageDescription,
CameraUsageDescription,
MicrophoneUsageDescription,
} = {}
) => {
const photoDescription =
PhotoLibraryUsageDescription ||
"Allow $(PRODUCT_NAME) to access your photo library";
const CameraDescription =
CameraUsageDescription || "Allow $(PRODUCT_NAME) to access your camera";
const MicrophoneDescription =
MicrophoneUsageDescription ||
"Allow $(PRODUCT_NAME) to access your microphone";
return withInfoPlist(config, (config) => {
config.modResults.NSPhotoLibraryUsageDescription =
"Allow $(PRODUCT_NAME) to access your photo library";
config.modResults.NSCameraUsageDescription =
"Allow $(PRODUCT_NAME) to access your camera";
config.modResults.NSMicrophoneUsageDescription =
"Allow $(PRODUCT_NAME) to access your microphone";
config.modResults.NSPhotoLibraryUsageDescription = photoDescription;
config.modResults.NSCameraUsageDescription = CameraDescription;
config.modResults.NSMicrophoneUsageDescription = MicrophoneDescription;

@@ -12,0 +31,0 @@ return config;

{
"name": "with-rn-image-crop-picker",
"version": "0.0.3",
"version": "0.0.4",
"homepage": "https://github.com/mwegener-com/with-rn-image-crop-picker#readme",

@@ -5,0 +5,0 @@ "author": "Marius Wegener",

@@ -26,7 +26,30 @@ # with-rn-image-crop-picker

$ expo prebuild
$ expo run:ios --devive
$ expo run:ios --device
```
# Configuartion
You can configure the iOS messages by adding the following props:
- PhotoLibraryUsageDescription
- CameraUsageDescription
- MicrophoneUsageDescription
Example:
```javascript
"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"
}
]
],
```
# Contributing
Contributions are very welcome!.
Contributions are very welcome!
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc