Asks the delegate whether the heading calibration alert should be displayed.
- iOS 3.0+
- Mac Catalyst 13.0+Beta
- watchOS 2.0+
- Core Location
The location manager object coordinating the display of the heading calibration alert.
YES if you want to allow the heading calibration alert to be displayed;
NO if you do not.
Core Location may call this method in an effort to calibrate the onboard hardware used to determine heading values. Typically, Core Location calls this method at the following times:
The first time heading updates are ever requested
When Core Location observes a significant change in magnitude or inclination of the observed magnetic field
If you return
YES from this method, Core Location displays the heading calibration alert on top of the current window immediately. The calibration alert prompts the user to move the device in a particular pattern so that Core Location can distinguish between the Earth’s magnetic field and any local magnetic fields. The alert remains visible until calibration is complete or until you explicitly dismiss it by calling the
dismiss method. In the latter case, you can use this method to set up a timer and dismiss the interface after a specified amount of time has elapsed.
If you return
NO from this method or do not provide an implementation for it in your delegate, Core Location does not display the heading calibration alert. Even if the alert is not displayed, calibration can still occur naturally when any interfering magnetic fields move away from the device. However, if the device is unable to calibrate itself for any reason, the value in the
heading property of any subsequent events will reflect the uncalibrated readings.