cordova-imagePicker plugin causing error on build service


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


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.


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?


Answering my own question:

  {"source":"","variables":{"PHOTO_LIBRARY_USAGE_DESCRIPTION":"Blah blah blah"}}