Contents

isMagnetometerActive

A Boolean value that determines whether magnetometer updates are currently happening.

Declaration

var isMagnetometerActive: Bool { get }

Discussion

This property indicates whether the startMagnetometerUpdates(to:withHandler:) or startMagnetometerUpdates() method has been called since the last time the stopMagnetometerUpdates() method was called. (If the start methods hadn’t been called, the app could be getting updates from the magnetometer after calling, for example, startDeviceMotionUpdates(), but this property would return false.)

See Also

Related Documentation

Determining Which Services Are Active