Ios info.plist: plugin camera not referenced

I learned that in order to satisfy the ios people, we have to install the camera-plugin as follows:

ionic cordova plugin add cordova-plugin-camera --variable PHOTOLIBRARY_USAGE_DESCRIPTION="description" --variable CAMERA_USAGE_DESCRIPTION="description"

Now, this inserts the reference "cordova": { "plugins": { "cordova-plugin-camera": { "PHOTOLIBRARY_USAGE_DESCRIPTION": "Die App speichert Ihre Tierfotos" } }
into package.json but when I add the ios-platform the camera with Usage Description is not referenced in platforms\ios\tss-info.plist. This always worked before. Now not any more.

My ionic info:
cli packages: (C:\Users\LENOVO\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages:
cordova (Cordova CLI) : 8.0.0

local packages:
@ionic/app-scripts : 3.1.6
Cordova Platforms : ios 4.5.4
Ionic Framework : ionic-angular 3.9.2

Android SDK Tools : 26.1.1
Node : v8.9.4
npm : 5.6.0
OS : Windows 10

Environment Variables:
ANDROID_HOME : C:\Users\LENOVO\AppData\Local\Android\sdk

backend : pro

Thanks for any help!

A friend, Simon form Ionic Academy, gave me the solution:

<edit-config file="*-Info.plist" mode="merge" target="NSCameraUsageDescription">
        <string>xxx description</string>
    <edit-config file="*-Info.plist" mode="merge" target="NSPhotoLibraryUsageDescription">
        <string>xx description</string>

1 Like

Where should we be putting that? In project config.xml, platform config.xml, or both?

And if it’s in the project config, are you putting it in te iOS platform tag or before with all the other general settings?

In your config.xml, the one on the root of your project

The tags as direct child of the root tag


File location relative to your project root:


Tags edit-config in your xml:

<?xml version='1.0' encoding='utf-8'?>

Note on both of you @swissfritz and @jaydz : there are two other edit-config tags which need to be specified, respectively NSLocationWhenInUseUsageDescription and NSPhotoLibraryAddUsageDescription

See iOS Quirks section of the README of the plugin


Thanks @reedrichards

1 Like

Thanks @reedrichards!

1 Like