搜索所有 iBeacons 而不仅仅是特定的 UUID [英] Search for all iBeacons and not just with specific UUID
问题描述
是否可以搜索附近的所有 iBeacons
?我知道可以通过 UUID 搜索 iBeacons
.但我想找到附近的所有 iBeacons
.
Is it possible to search for all iBeacons
which are nearby? I know it's possible to search iBeacons
by UUID. But i want to find all iBeacons
nearby.
推荐答案
一个 iBeacon 是一个区域,并且具有作为定义属性的 UUID.因此,您只能搜索匹配 UUID 的那些.在找到具有特定 UUID 的一个或多个之后,您可以使用委托回调找出最接近的一个,其中信标存储在按距离排序的数组中.
An iBeacon is a region, and has as defining property the UUID. Therefore, you can only search for the ones matching a UUID. After you find one or more with a specific UUID, you can figure out which is closest using the delegate callbacks, where the beacons are stored in an array ordered by distance.
这里有很棒的示例代码,还有一个非常详细的 WWDC 视频会议:Core Location 中的新功能"
There is great sample code on this and also a pretty detailed WWDC video session: "What's new in Core Location"
这篇关于搜索所有 iBeacons 而不仅仅是特定的 UUID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!