You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Classic - Project 22: Detect a Beacon.
I see alerts:
locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) was deprecated in iOS 14.0
locationManager(_ manager: CLLocationManager, didRangeBeacons beacons: [CLBeacon], in region: CLBeaconRegion) was deprecated in iOS 13.0
Maybe need to update below functions in HackingWithSwift/Classic/project22/Project22/ViewController.swift
func locationManager(_ manager:CLLocationManager, didChangeAuthorization status:CLAuthorizationStatus){
if status ==.authorizedAlways {
if CLLocationManager.isMonitoringAvailable(for:CLBeaconRegion.self){
if CLLocationManager.isRangingAvailable(){startScanning()}}}}func locationManager(_ manager:CLLocationManager, didRangeBeacons beacons:[CLBeacon], in region:CLBeaconRegion){
if beacons.count >0{letbeacon=beacons[0]update(distance: beacon.proximity)}else{update(distance:.unknown)}}
to
func locationManagerDidChangeAuthorization(_ manager:CLLocationManager){
if manager.authorizationStatus ==.authorizedAlways {
if CLLocationManager.isMonitoringAvailable(for:CLBeaconRegion.self){
if CLLocationManager.isRangingAvailable(){startScanning()}}}}func locationManager(_ manager:CLLocationManager, didRange beacons:[CLBeacon], satisfying beaconConstraint:CLBeaconIdentityConstraint){
if beacons.count >0{letbeacon=beacons[0]update(distance: beacon.proximity)}else{update(distance:.unknown)}}
The text was updated successfully, but these errors were encountered:
Classic - Project 22: Detect a Beacon.
I see alerts:
locationManager(_ manager: CLLocationManager, didChangeAuthorization status: CLAuthorizationStatus) was deprecated in iOS 14.0
locationManager(_ manager: CLLocationManager, didRangeBeacons beacons: [CLBeacon], in region: CLBeaconRegion) was deprecated in iOS 13.0
Maybe need to update below functions in HackingWithSwift/Classic/project22/Project22/ViewController.swift
to
The text was updated successfully, but these errors were encountered: