How to add variables which iOS 10 requires to cordova-plugin-camera in RHMAP buildfarm
Issue
- I am about to build using the camera plugin in my current project, and I see in the readme (https://github.com/apache/cordova-plugin-camera) the following lines below. So I just want to find out how I can deal with this.
iOS Quirks
Since iOS 10 it's mandatory to add aNSCameraUsageDescriptionandNSPhotoLibraryUsageDescriptionin theinfo.plist.
NSCameraUsageDescriptiondescribes the reason that the app accesses the user’s camera.
NSPhotoLibraryUsageDescriptiondescribes the reason the app accesses the user's photo library.
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 following variables on plugin install.
CAMERA_USAGE_DESCRIPTIONforNSCameraUsageDescription
PHOTOLIBRARY_USAGE_DESCRIPTIONforNSPhotoLibraryUsageDescription
Example:cordova plugin add cordova-plugin-camera --variable CAMERA_USAGE_DESCRIPTION="your usage message" --variable PHOTOLIBRARY_USAGE_DESCRIPTION="your usage message"
If you don't pass the variable, the plugin will add an empty string as value.
Environment
- Red Hat Mobile Application Platform (RHMAP) 3
- Cordova
- iOS 10
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
