我正在使用离子1与cordova-plugin-camera 2.3.0 . 我正在使用最新版本的cordova .
当我按下按钮获取图像是否在ios 10中使用相机或图库($ cordovaCamera.getPicture)时,没有任何反应 . 如果我按下主页按钮并返回应用程序,相机或画廊会立即弹出 .
我已经启用了它的权限 .
这适用于ios 9及以下和所有Android版本 .
请帮忙 .
我确认这是在_2516727中解决的,正如SvenSönnichsen在该问题的评论中指出的那样 .
将 gap://ready file: 添加到 index.html 中的Content-Security-Policy元标记 .
gap://ready file:
index.html
<meta http-equiv="Content-Security-Policy" content="default-src * gap://ready file:; script-src 'self' 'unsafe-inline' 'unsafe-eval' *; style-src 'self' 'unsafe-inline' *">
这里也提到了这一点:https://forums.adobe.com/thread/2211591其中Allsetra ICT表示将元标记更改为这种简单形式也有效(尽管我没有对其进行验证) .
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
1 回答
我确认这是在_2516727中解决的,正如SvenSönnichsen在该问题的评论中指出的那样 .
将
gap://ready file:
添加到index.html
中的Content-Security-Policy元标记 .这里也提到了这一点:https://forums.adobe.com/thread/2211591其中Allsetra ICT表示将元标记更改为这种简单形式也有效(尽管我没有对其进行验证) .