Wechat hardware onScanWXDeviceResult permission injection failed?

< H1 > use the wx.config () function to inject api for onScanWXDeviceResult hardware scan events, and the calling permission is always false on iOS < / H1 >

1. Wx.config () injection permission was used!

wx.config({
    beta:true,                  
    debug: false,                
    appId: appID,     
    timestamp: ,           
    nonceStr: ,       
    signature: ,
    jsApiList: ["onScanWXDeviceResult"]     
})

2. Use wx.ready () to verify success

wx.ready(function(){
    wx.checkJsApi({
        jsApiList: ["onScanWXDeviceResult"],
        success: function(res) {
            
        }
    })
})


clipboard.png

Mar.15,2021

consulted Wechat official. This API Wechat is not open on ios. But there are other solutions. I haven't thought of it yet.

Menu