From 46b925cda5e53b7a56a3f0169a073bb6c07d0a08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20C=C3=A9sar?= Date: Tue, 13 Mar 2018 23:18:07 +0100 Subject: [PATCH] Revert usage description changes --- README.md | 16 ++++++++-------- plugin.xml | 4 ++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c03b80e2..baf2a4ff 100644 --- a/README.md +++ b/README.md @@ -42,17 +42,15 @@ Note: Windows 10 applications can not be build for `AnyCPU` architecture, which cordova run windows -- --archs=x86 ``` -Note: Since iOS 10 it's mandatory to add a `NSCameraUsageDescription` in the `Info.plist`. +Note: Since iOS 10 it's mandatory to add a `NSCameraUsageDescription` in the info.plist. -`NSCameraUsageDescription` describes the reason that the app accesses the user's camera. -When the system prompts the user to allow access, this string is displayed as part of the dialog box. If you didn't provide the usage description, the app will crash before showing the dialog. Also, Apple will reject apps that access private data but don't provide an usage description. +`NSCameraUsageDescription` describes the reason that the app accesses the user’s camera. +When the system prompts the user to allow access, this string is displayed as part of the dialog box. -To add this entry you can use the `edit-config` tag in the `config.xml` like this: +To add this entry you can pass the following variable on plugin install. ``` - - To scan barcodes - +cordova plugin add phonegap-plugin-barcodescanner --variable CAMERA_USAGE_DESCRIPTION="To scan barcodes" ``` ### PhoneGap Build Usage @@ -61,7 +59,9 @@ Add the following to your config.xml: ``` - + + + ``` On PhoneGap Build if you're using a version of cordova-android of 4 or less, ensure you're building with gradle: ``` diff --git a/plugin.xml b/plugin.xml index 733db7fc..6b20ff0a 100644 --- a/plugin.xml +++ b/plugin.xml @@ -18,6 +18,10 @@ + + $CAMERA_USAGE_DESCRIPTION + +