Detecting beacons via iBeacon Monitoring & Ranging vs CoreBluetooth scanForPeripheralsWithServices

后端 未结 1 1392
礼貌的吻别
礼貌的吻别 2021-01-30 09:44

There is a lot of confusion regarding the restrictions that are applied by the iOS on apps that want to scan BLE beacons\\peripherals. After reading several blogs and Stack Over

相关标签:
1条回答
  • 2021-01-30 10:03

    You are mostly right with your description. Just two clarifications:

    • The 20 region limit is not per device, it is app-specific. No matter what other apps are doing on the mobile device, your app is still allowed to monitor up to 20 regions by iOS. That said, there are likely hardware limits that are device-specific on how many regions can be monitored in the background with hardware assistance. These limits are undocumented. If you surpass these undocumented limits, it will probably take a lot longer to detected beacons in the background. (Although that said, there is no OS guarantee of when the detections come, anyway.)

    • You cannot connect to a CLBeacon using Monitoring and Ranging APIs. These APIs only work with BLE advertising packets, which are connectionless.

    Yes, it is possible to use scanForPeripheralsWithServices as an alternative. This is what Gimbal beacons do in order to implement a proprietary system. There are real disadvantages, however, in terms of background detection time and reliability.

    0 讨论(0)
提交回复
热议问题