Is it possible to monitor heading / course after triggering CLRegion?

103 Views Asked by At

I mean i would like this to happen :

1 - monitor exiting a region 2 - when the region triggers , i would like to know ex: if the user exiting this region is going North or South and trigger an specific notification based on that ...

1

There are 1 best solutions below

0
kuhncj On BEST ANSWER

Yes, you can start monitoring for heading updates using CLLocationManager.

 if CLLocationManager.headingAvailable() {
       manager.headingFilter = 5
       manager.startUpdatingHeading()
}

then the CLLocationManager's delegate will provide heading updates via:

func locationManager(_ manager: CLLocationManager,
                     didUpdateHeading newHeading: CLHeading)