Instance Property


Returns the magnetic field measured by the magnetometer.


@property(readonly, nonatomic) CMMagneticField magneticField;


The value of this property is the total magnetic field observed by the device which is equal to the Earth’s geomagnetic field plus bias introduced from the device itself and its surroundings.

This is the “raw” magnetic-field value, unlike the calibrated value of the magneticField property of CMDeviceMotion which filters out the bias introduced by the device and, in some cases, its surrounding fields.

See Also

Getting the Field Strength


A structure containing 3-axis magnetometer data