Closed Rajesh-Kasula closed 4 years ago
i am trying to get temperature value using estimote beacon. var beaconConnection : ESTBeaconConnection?
// MARK:- Beacon Connection func beaconConnectionSetUp(beacon:CLBeacon){ beaconConnection = ESTBeaconConnection.init(beacon: beacon, delegate: self, startImmediately: true) beaconConnection?.start() } func readTemperatureFromBeacon() { beaconConnection?.readTemperature(completion: { (temperature, error) in if error == nil{ print(temperature!) }else{ print(error?.localizedDescription as Any) } }) } func beaconConnectionDidSucceed( connection: ESTBeaconConnection) { // let timer = Timer.scheduledTimer(timeInterval: 0.4, target: self, selector: #selector(readTemperatureFromBeacon), userInfo: nil, repeats: true) readTemperatureFromBeacon() } func beaconManager( manager: Any, didFailWithError error: Error) { print(error.localizedDescription) }
i am trying to get temperature value using estimote beacon. var beaconConnection : ESTBeaconConnection?
// MARK:- Beacon Connection func beaconConnectionSetUp(beacon:CLBeacon){ beaconConnection = ESTBeaconConnection.init(beacon: beacon, delegate: self, startImmediately: true) beaconConnection?.start() } func readTemperatureFromBeacon() { beaconConnection?.readTemperature(completion: { (temperature, error) in if error == nil{ print(temperature!) }else{ print(error?.localizedDescription as Any) } }) } func beaconConnectionDidSucceed( connection: ESTBeaconConnection) { // let timer = Timer.scheduledTimer(timeInterval: 0.4, target: self, selector: #selector(readTemperatureFromBeacon), userInfo: nil, repeats: true) readTemperatureFromBeacon() } func beaconManager( manager: Any, didFailWithError error: Error) { print(error.localizedDescription) }