8***@qq.com
8***@qq.com
  • 发布:2020-07-22 14:24
  • 更新:2020-07-22 14:24
  • 阅读:545

勾选V3编译后,app中ibeacon识别不到

分类:uni-app

在没有勾选 v3 编译的时候,真机运行就可以扫描到ibeacon设备

但选择v3 编译后,就识别不到ibeacon ,onBeaconUpdate方法不进去

async function openBluetoothAdapter (onError) {  
  // 微信内浏览器直接认为打开  
  if (env.isWXWV) return isOpen = true  
  const data = await uni.openBluetoothAdapter({})  
  const [err, res] = data  
  if (err) return onError(err)  
  isOpen = true  
  console.log(`开启蓝牙模块`)  
  return res  
}  
async function closeBluetoothAdapter (OBJECT) {  
  await uni.closeBluetoothAdapter({})  
  console.log(`关闭蓝牙模块`)  
  isOpen = false  
}  
async function startBeaconDiscovery (uuids, onError) {  
  if (env.isWXWV) {  
    wx.startSearchBeacons({  
      ticket: '',  
      complete: function (argv) {  
        isStarted = true  
      }  
    })  
  } else {  
    const data = await uni.startBeaconDiscovery({ uuids })  
    const [err, res] = data  
    if (err) return onError(err)  
    isStarted = true  
    console.log(`开启ibeacon扫描`)  
  }  
}
2020-07-22 14:24 负责人:无 分享
已邀请:

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