cordova-imagePicker plugin causing error on build service


#1

I’m trying to use cordova-imagePicker in my projects.

[
  {"source":"https://github.com/wymsee/cordova-imagePicker.git"}
]

The iOS build service fails with this error:

One of your plugins is missing the following variables: "PHOTO_LIBRARY_USAGE_DESCRIPTION"

An explanation of this problem is on the plugin page:

Starting from iOS 10, Apple started asking for specifying the reason for accessing the user’s photo library, therefore it’s mandatory to add NSPhotoLibraryUsageDescription entry in the info.plist.

NSPhotoLibraryUsageDescription describes the reason that 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. In order to add this entry you must pass the variable PHOTO_LIBRARY_USAGE_DESCRIPTION on plugin install.

Example:

cordova plugin add cordova-plugin-image-picker --variable PHOTO_LIBRARY_USAGE_DESCRIPTION=“your message”

Fair enough. But how can I do this using Appgyver’s build service?


#2

Answering my own question:

[
  {"source":"https://github.com/wymsee/cordova-imagePicker.git","variables":{"PHOTO_LIBRARY_USAGE_DESCRIPTION":"Blah blah blah"}}
]