Hi Guys,
i’m probably missing something here.
i am trying to setup an env for indoor sdk testing(its my first time…) so here it is below…,
but there are no position updates
class ViewController: UIViewController,EILIndoorLocationManagerDelegate {
let locationBuilder = EILLocationBuilder()
var roomDimensions:[EILPoint] = [EILPoint]()
var locationManager = EILIndoorLocationManager()
var location:EILLocation!
override func viewDidLoad() {
....
locationManager.mode = .Normal
locationManager.delegate = self
setupEnv()
setupBeaconsEnv()
locationManager.startPositionUpdatesForLocation(location)
}
// set room dimensions and orientation
func setupEnv() {
roomDimensions.append(EILPoint(x: 0, y: 0))
roomDimensions.append(EILPoint(x: 0, y: 2.88))
roomDimensions.append(EILPoint(x: 4.2, y: 2.88))
roomDimensions.append(EILPoint(x: 4.2, y: 0))
locationBuilder.setLocationBoundaryPoints(roomDimensions)
locationBuilder.setLocationOrientation(162.0)
}
// set beacons locations and build into location (the bla bla is a real beacon identifier in my code...)
func setupBeaconsEnv() {
locationBuilder.addBeaconWithIdentifier("bla bla", atBoundarySegmentIndex: 0, inDistance: 1.64, fromSide: .LeftSide)
locationBuilder.addBeaconWithIdentifier("bla bla", atBoundarySegmentIndex: 1, inDistance: 0.71, fromSide: .LeftSide)
locationBuilder.addBeaconWithIdentifier("bla bla", atBoundarySegmentIndex: 2, inDistance: 1.60, fromSide: .RightSide)
locationBuilder.addBeaconWithIdentifier("bla bla", atBoundarySegmentIndex: 3, inDistance: 0.8, fromSide: .RightSide)
location = locationBuilder.build()!
}
so to summarise things :
- delegate - check
- room dimension - check
- beacon location - check
- start pulling data - check
- no updates… check
so my question/needed help here is what am i missing here …
tried the following
- bluetooth turned off an on…, didnt help
- when i turn off the bluetooth while the app is running i get the
func indoorLocationManager(manager: EILIndoorLocationManager,didFailToUpdatePositionWithError error: NSError) {
print(“failed to update position: (error)”)
}
invoked !!!, so something is working here, but i still do not get any updates at all
Thanks