在苹果6运行时点击搜索按钮后系统就显示是否访问权限后就闪退了,JSON文件中的5+功能模块(permissions)是有添加的
"iBeacon": {
"description": "iBeacon"
},
document.getElementById('bt3').addEventListener('tap',function () {
plus.ibeacon.startBeaconDiscovery({
success: function() {
plus.ibeacon.getBeacons({
success: function(e) {
var beacons = e.beacons;
var uuids = null;
for (var i in beacons) {
if (uuids) {
uuids = ', ' beacons[i].uuid;
} else {
uuids = beacons[i].uuid;
}
}
plus.nativeUI.alert('Beacons: ' uuids);
},
failed: function(e) {
plus.nativeUI.alert('getBeacons error: ' JSON.stringify(e));
}
});
},
failed: function(e) {
plus.nativeUI.alert('start error: ' JSON.stringify(e));
}
});
});
2 个回复
DCloud_IOS_XTY
可以到https://github.com/BrightBeacon/iBeaconForHBuilder.git提交Issues
1***@163.com
你好,我也在用h5+开发ibeacon,但是我遇到一个问题,就是ios上收不到ibeacon,安卓可以,请问你知道是什么问题吗?