CMDeviceMotion returns 0 values for magnetic field

后端 未结 1 1011
粉色の甜心
粉色の甜心 2021-01-12 12:00

I am developing iOS app with compass functionality. I have tried to use CMMagnetometerData updates which give uncalibrated, but normal results.

After t

相关标签:
1条回答
  • 2021-01-12 12:21

    Finally, according to my own observations:

    1) Use startDeviceMotionUpdatesUsingReferenceFrame:toQueue:withHandler:with referenceFrame NOT equal to allZeros or XArbitraryZVertical.

    2) Set showsDeviceMovementDisplay to true.

    After few zero-value updates with accuracy CMMagneticFieldCalibrationAccuracyUncalibrated it will normalise.

    0 讨论(0)
提交回复
热议问题