9***@qq.com
9***@qq.com
  • 发布:2018-03-02 10:18
  • 更新:2018-03-02 10:40
  • 阅读:1241

IOS 11.2.6 无法检测是否允许打开相机

分类:HBuilder

点击拍照操作,如果没有允许使用摄像头,照样会打开摄像头,但是黑屏。有么有点击拍照操作时就有提示啊,官方有人能回复下吗,急急急!!! 网上给的检测拍照Native,js代码在11.2.6 不通过

2018-03-02 10:18 负责人:无 分享
已邀请:
cydida

cydida

请贴出相关代码

  • 9***@qq.com (作者)

    function getImage() {

    在这就检测是否允许摄像头,下面的方法有问题


    // if(IoA=="1"){

    // var AVCaptureDevice = plus.ios.importClass("AVCaptureDevice");

    // var Status = AVCaptureDevice.authorizationStatusForMediaType("vide");

    // if (3 != Status) {

    // mui.toast('请在设置中允许使用相机');

    // return false;

    // }

    // }


    var cmr = plus.camera.getCamera();

    alert(cmr.supportedImageFormats);

    cmr.captureImage(function(p) {

    plus.io.resolveLocalFileSystemURL(p, function(entry) {

    if(IoA=="1")

    {

    fl="1";

    }

    else{

    fl="1";

    }


    var path = entry.toLocalURL();


    ToZip(path);

    },


    function(e) {


    console.log(e);

    });


    },

    function(e) {

    console.log(e);

    }, {

    filename: "_doc/camera/",

    });

    }


    苹果拒绝

    We discovered one or more bugs in your app when reviewed on iPhone running iOS 11.2.6 on Wi-Fi connected to an IPv6 network.


    Specifically, your tapping on “拍照,” your app requests users to access Settings to allow camera permission; however, your app does not request access to use’s camera feature.


    Please see attached screenshots for details.

    2018-03-02 10:45

9***@qq.com

9***@qq.com (作者)

function getImage() {
在这就检测是否允许摄像头,下面的方法有问题

// if(IoA=="1"){
// var AVCaptureDevice = plus.ios.importClass("AVCaptureDevice");
// var Status = AVCaptureDevice.authorizationStatusForMediaType("vide");
// if (3 != Status) {
// mui.toast('请在设置中允许使用相机');
// return false;
// }
// }
var cmr = plus.camera.getCamera();
alert(cmr.supportedImageFormats);
cmr.captureImage(function(p) {
plus.io.resolveLocalFileSystemURL(p, function(entry) {
if(IoA=="1")
{
fl="1";
}
else{
fl="1";
}
var path = entry.toLocalURL();
ToZip(path);
},
function(e) {
console.log(e);
});
},
function(e) {
console.log(e);
}, {
filename: "_doc/camera/",
});
}

苹果拒绝
We discovered one or more bugs in your app when reviewed on iPhone running iOS 11.2.6 on Wi-Fi connected to an IPv6 network.

Specifically, your tapping on “拍照,” your app requests users to access Settings to allow camera permission; however, your app does not request access to use’s camera feature.

Please see attached screenshots for details.

该问题目前已经被锁定, 无法添加新回复