使用cordova-plugin-image-picker插件时,图片在iOS端不显示

新手上路,请多包涵

1.安装插件后,调用相应的方法,在iOS端不显示,根据在safari上调试,提示 “Not allowed to load local resource: file:///var/mobile/Containers/Data/Application/48F48A60-A3B7-4654-B49B-CB08B378192A/tmp/cdv_photo_007.jpg” 这样的错误。
2.根据网上相关提示的相关方法,已经在config.xml中做了相关的白名单配置,如下:
<access origin='*' allows-arbitrary-loads-for-media='true' allows-arbitrary-loads-in-web-content='true' allows-local-networking='true' />
在index.html中做了如下配置:<meta http-equiv="Content-Security-Policy" content="img-src * 'self' data: blob: cdvphotolibrary: filesystem: cdvfile:">。但是问题依然未解决,哪位大神求告知。
3.相关代码如下:
js: window.imagePicker.getPictures(

    function(results) {
      $scope.imageArr = results;
      console.log($scope.imgArr);
      $scope.$apply();
    }, function (error) {
      console.log('错误信息为: ' + error);
    },{
      maximumImagesCount: 9,
      width:100,
      height:100,
      quality:50
    }
  );
  

html: <div class="item" ng-repeat="image in imageArr">

    <img ng-src="{{image}}" style="width: 120px;height: 120px;margin-left:calc(50% - 60px);"/>
  </div> 
  
      
阅读 3k
1 个回答
新手上路,请多包涵

请问这个问题你解决了吗

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题