我已经安装了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>
答案 0 :(得分:0)
尝试在package.json
中添加相同内容,如下所示,
"cordova": {
"plugins": {
"cordova-plugin-camera": {
"CAMERA_USAGE_DESCRIPTION": "App needs the permission to take image."
}
}
}