且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

BLE在后台

更新时间:2023-01-24 08:33:06

每隔一段时间,CoreLocation就会挂起并且不会报告任何新的进入/退出事件。重新启动手机通常可以解决这个问题。轶事报道的增加表明,自iOS 7.1发布以来,这可能更为常见(我在***过去几周看到过这样的其他两个问题,我们在Radius Networks的这个问题上得到了很多支持请求),但没有确凿证据证明7.1的变化会影响这一点。

Every once in awhile, CoreLocation will get hung up and not report any new entry/exit events. Rebooting the phone generally fixes this. An increase in anecdotal reports suggest this may be more common since the release of iOS 7.1 (I have seen two other questions like this in the past few weeks on ***, and we have gotten lots of support requests on this issue at Radius Networks), but there is no hard evidence to prove a change in 7.1 affects this.

编辑:其他地方收集的其他数据显示,当这些挂起发生时,蓝牙继续为了正常工作,挂起的设备仍然可以作为iBeacon进行传输。这表明CoreLocation中的一个错误会导致定期蓝牙LE扫描以查找iBeacons停止。到目前为止,唯一已知的修复方法是重新启动受影响的手机。

这个问题非常罕见,以至于我无法对其进行定性以了解根原因。这是蓝牙问题吗? CoreLocation问题?你的设置可能是找到问题的理想方法。

The problem is rare enough that I have never been able to characterize it to know the root cause. Is it a Bluetooth problem? A CoreLocation problem? Your setup might be producing an ideal means of finding the issue.

一旦你重现这个问题,我就会这样做:

As soon as you reproduce this issue, here is what I would do:


  1. 启动另一个iBeacon扫描程序,如找到iBeacon ,并为该区域内的任何iBeacons设置范围(确保配置了Proximity UUID。)你看到了吗?如果是这样,蓝牙和CoreLocation可以正常工作,因此问题可能出在你的应用上。

  1. Start another iBeacon scanning program like Locate for iBeacon, and have it range for any iBeacons in the area (be sure your Proximity UUIDs are configured.) Do you see them? If so, Bluetooth and CoreLocation work, so the issue may be with your app.

如果你在(1)中没有看到任何iBeacons,请转到设置>蓝牙,并扫描其他附近的设备(甚至是经典的蓝牙设备)。使您的Macbook或蓝牙耳机可见,以便于测试。如果你没有看到任何设备,那么蓝牙就会被挂断。尝试将其关闭并重新打开。

If you do not see any iBeacons in (1), go to Settings > Bluetooth, and do a scan for other nearby devices (even classic Bluetooth devices). Make your Macbook or bluetooth headset visible to make this easy to test. If you do not see any devices then bluetooth is hung up. Try turning it off and back on.

如果您在(2)中看到蓝牙设备但在(1)中没有iBeacons,那么可能存在操作系统问题处理CoreLocation。

If you see Bluetooth devices in (2) but no iBeacons in (1) then there may be an OS problem with handling CoreLocation.

我有兴趣了解你的看法。上面的过程不会解决您的问题,但它可能会提供更多证据证明可以进行修复的事情。

I'd be interested in knowing what you see. The procedure above won't fix your problem, but it might give some more evidence of what is going on that will make a fix possible.

以下是用户的其他问题报告类似问题:

Here are other questions where users report a similar problem:

iBeacon的iOS应用必须重启设备

ibeacon在iPhone 4S中没有出现