Ionic / Cordova Info.plist缺少CAMERA_USAGE_DESCRIPTION

时间:2018-03-20 11:48:48

标签: ios cordova ionic-framework ionic3

我已经安装了https://github.com/apache/cordova-plugin-camera插件,当我在ios上构建时,它一直说相机使用情况缺失,即使在我做完之后

ionic cordova plugin add cordova-plugin-camera --variable CAMERA_USAGE_DESCRIPTION="your usage message" --variable PHOTOLIBRARY_USAGE_DESCRIPTION="your usage message"

我也尝试在config.xml中添加一些行,如下所示,但没有运气。因此,我尝试通过XCode手动添加它,但如下所示,它没有privacy - camera ...

<edit-config file="*-Info.plist" mode="merge" target="NSCameraUsageDescription">
    <string>Take pictures of documents for specific freight</string>
</edit-config>

enter image description here

1 个答案:

答案 0 :(得分:0)

尝试在package.json中添加相同内容,如下所示,

"cordova": {
    "plugins": {
      "cordova-plugin-camera": {
        "CAMERA_USAGE_DESCRIPTION": "App needs the permission to take image."
      }
    }
  }