magneticField
Returns the magnetic field vector with respect to the device.
Declaration
var magneticField: CMCalibratedMagneticField { get }Discussion
The CMCalibratedMagneticField returned by this property gives you the total magnetic field in the device’s vicinity without device bias. Unlike the magneticField property of the CMMagnetometerData class, these values reflect the earth’s magnetic field plus surrounding fields, minus device bias.
If the device does not have a magnetometer, the accuracy field of the property’s value (a CMCalibratedMagneticField structure) is CMMagneticFieldCalibrationAccuracy.uncalibrated.