Core Motion 102错误是什么意思? [英] What does Core Motion error 102 mean?

查看:146
本文介绍了Core Motion 102错误是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Core Motion的传感器融合以获得朝北的动作更新:

I use Core Motion's sensor fusing to get north oriented motion updates:

[motionManager startDeviceMotionUpdatesUsingReferenceFrame:CMAttitudeReferenceFrameXTrueNorthZVertical toQueue:motionQueue withHandler:motionHandler]

在极少数情况下,只能在选定的客户设备上复制(运行iOS的iPhone 4S) 6.0.2)我在motionHandler中收到此错误:

In a very rare case that can be reproduced only on selected customer devices (iPhone 4S running iOS 6.0.2) I receive this error in the motionHandler:

Error Domain=CMErrorDomain Code=102 "The operation couldn’t be completed. (CMErrorDomain error 102.)

此外,似乎我没有获得任何有效的deviceMotion更新有没有人知道这个错误102意味着什么?我在文档中找不到任何内容。

Also, it seems I don't get any valid deviceMotion updates after that. Does anybody know what this error 102 means? I can't find anything in the documentation.

推荐答案

正确的Krishnabhadra指出,这个错误代码意味着 CMErrorTrueNorthNotAvailable 。描述(这个设备上没有True north。这通常是ind表示设备的位置尚不可用。)遗憾的是没有给出任何提示如何解决问题所以我想在发生此错误时描述我的发现。

As Krishnabhadra correctly pointed out, this error code means CMErrorTrueNorthNotAvailable. The description ("True north is not available on this device. This usually indicates that the device’s location is not yet available.") unfortunately doesn't give any hint how to solve the issue so I'd like to describe my findings when this error occurs.

当使用 CMAttitudeReferenceFrameXTrueNorthZVertical 时,它出现在iOS 6.0+设备中的一小部分(少数几个)中( CMAttitudeReferenceFrameXMagneticNorthZVertical 没问题)。尽管有错误描述,但Core Location正常工作。在受影响的设备上,错误在100%的情况下被触发,并完全阻止Core Motion更新。 - [CMMotionManager deviceMotion] 始终返回 nil

It occurs on a tiny (a handful out of many thousands) fraction of iOS 6.0+ devices when using CMAttitudeReferenceFrameXTrueNorthZVertical (CMAttitudeReferenceFrameXMagneticNorthZVertical is OK). Despite the error description, Core Location works correctly. On affected devices the bug is triggered in 100% of the cases and blocks Core Motion updates completely. -[CMMotionManager deviceMotion] always returns nil.

重置iOS系统设置可以解决问题。

Resetting the iOS system settings fixes the problem.

我已经记录了 rdar:// 12952327 以及更多细节。

I’ve logged rdar://12952327 with some more details.

更新:
如果罗盘校准是在隐私/位置服务/系统服务部分禁用。

Update: This error occurs if compass calibration is disabled in the privacy / location services / system services section.

这篇关于Core Motion 102错误是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆