Hello
I am creating an app that uses ibeacons and am close to finishing it however I have two errors that I don't know how to fix and cannot find a solution for anywhere.
The code are asociated with the following lines:
locationManager.startMonitoring(for: beaconRegion)
Value of type '(CLLocationManager, [CLBeacon], CLBeaconRegion) -> has no member 'startMonitoring'
and
locationManager.startRangingBeacons(in: beaconRegion)
Value of type '(CLLocationManager, [CLBeacon], CLBeaconRegion) -> has no member 'startRangingBeacons'
Here is the entire section of code that I believe is contributing to this error:
let uuid = UUID(uuidString: "E2C56DB5-DFFB-48D2-B060-D0F5A71096E0")!
let beaconRegion = CLBeaconRegion(proximityUUID: uuid, identifier: "EVITA")
locationManager.startMonitoring(for: beaconRegion)
locationManager.startRangingBeacons(in: beaconRegion)
}
func locationManager(_ manager: CLLocationManager, didRangeBeacons beacons: [CLBeacon], in region: CLBeaconRegion) {
if beacons.count > 0 {
updateDistance(beacons[0].proximity)
} else {
updateDistance(.unknown)
}
}
Can anyone explain and potentially provide me a solution so that I can fix these errors, they are the only two errors that I have.
I am using Xcode 8.3.2 and am happy to post my entire code if you need it.
Thank you