Connect to iBeacon

后端 未结 1 337
广开言路
广开言路 2021-01-22 22:56

I can scan for iBeacons with:

func locationManager(manager: CLLocationManager!, didRangeBeacons beacons: [AnyObject]!, inRegion region: CLBeaconRegion!) {

  }
}         


        
相关标签:
1条回答
  • 2021-01-22 23:12

    You cannot obtain any information that directly relates a CLBeacon to a CBPeripheral.

    Typically the beacon's GATT service will expose a "device name" characteristic that you can display to the user to allow them to select the device to be configured from a list.

    As David pointed in the comments, any such GATT service will be vendor specific, or it may not even exist, with the beacon being configured through some other method, such as USB. Even where a GATT service is provided it may be disabled through configuration or only active for a limited period after initial power-on.

    There is no generic "configure an iBeacon" service defined.

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