diff --git a/README.md b/README.md index 3e30d22..7852909 100755 --- a/README.md +++ b/README.md @@ -54,15 +54,18 @@ The card.io Cordova Plugin adds support for the CardIO iOS and android platform. 1. Follow Your app integration section below. 2. Run `cordova run ios` or `cordova run android` to build and the project. -Note: For use with iOS 10 + -When building your app with the iOS 10 SDK +, you have to add some info to the info.plist file. This is due to increased security in iOS 10. Go to your app directory and search for the <your app name>Info.plist file. Add the following lines in the main <dict> element. +## iOS Quirks -```xml - NSCameraUsageDescription - To scan credit cards. -``` +Since iOS 10 it's mandatory to add a `NSCameraUsageDescription` entry 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. To add this entry you can pass the variable `CARD_IO_CAMERA_USAGE_DESCRIPTION` on plugin install. + +Example: +`cordova plugin add https://github.com/card-io/card.io-Cordova-Plugin --variable CARD_IO_CAMERA_USAGE_DESCRIPTION="your usage message"` -If you have a different way to edit .plist files - plugins etc. - you can do that. +If you don't pass the variable, the plugin will add a default string as value. Sample HTML + JS ---------------- diff --git a/plugin.xml b/plugin.xml index 7dca14a..8054794 100644 --- a/plugin.xml +++ b/plugin.xml @@ -57,6 +57,12 @@ + + + + $CARD_IO_CAMERA_USAGE_DESCRIPTION + +