首先說說iBeacon是什么:
iBeacons 是IOS7系統推出的功能。利用藍牙4.0(低功耗藍牙)進行數據傳輸(iphone 4s 以上設備)。手持設備能夠在一定的范圍內(可以達到50m之內)收到IBecons基站發送的信號。任何實現了IBeacon協議的藍牙設備都可以充當ibeacon基站使用。不同於GPS,蜂窩數據,wifi定位方式。藍牙4.0本身的成本低,設備的耗電量也低所以相比其它定位方式有自己的優勢。並且這種定位直接是端對端的直接定位,省去了GPS的衛星和蜂窩數據的基站通信,是對現有定位技術的一個有效的補充,有其利用的獨特的場景和價值。
Identifying the Beacon:(識別beacon設備)
beacon設備有三個屬性:用這三個屬性來區別不同的beacon設備
Available in iOS 7.0 and later. 官方注明:盡在ios7.0以上可用
@property(readonly, nonatomic, strong) NSUUID *proximityUUID
@property(readonly, nonatomic, strong) NSNumber *major
@property(readonly, nonatomic, strong) NSNumber *minor
Determining the Beacon Distance(確定距離屬性)
@property(readonly, nonatomic) CLProximity proximity
The value in this property gives a general sense of the relative distance to the beacon. Use it to quickly identify beacons that are nearer to the user rather than farther away.(這個屬性值只是給出一般意義上的距離關系,當靠近時用這個屬性可以快速識別beacon,)
@property(readonly, nonatomic) CLLocationAccuracy accuracy
(表示精度,米單位,不能精確表示,會被射頻信號干擾)
@property(readonly, nonatomic) NSInteger rssi
(表示信號強度,為采樣平均值)
Constants(包含beacon反映出的距離相關信息)
typedef {
CLProximityUnknown, (沒有發現)
CLProximityImmediate, (比較近)
CLProximityNear, (相當的近)
CLProximityFar (比較遠)
} CLProximity;
