Core Motion mode CMAttitudeReferenceFrameXTrueNorthZVertical not working on specific devices

Originator:futuretap
Number:rdar://12952327 Date Originated:
Status:Closed Resolved:
Product:iPhone/iPod touch Product Version:6.0.2
Classification:Other Bug Reproducible:Always
 
Summary:
When using Core Motion with CMAttitudeReferenceFrameXTrueNorthZVertical some devices consistently return a CMErrorTrueNorthNotAvailable (error code 102) in the in the CMDeviceMotionHandler block. It can be reproduced in 100% of the cases on affected devices. A reset of the iOS settings solves the problem.

Steps to Reproduce:
Run the pARk sample app on an affected device.

Expected Results:
The labels should move on the screen depending on the orientation of the device.

Actual Results:
The labels stay in the center of the screen and never move. (Screenshot: http://d.pr/i/dyjI)

Regression:
This happens at least since iOS 6.0. It happens only on a tiny fraction of devices but on those devices it is 100% reproducible. We've reports from only a handful of devices out of a user base of many thousands (the Augmented Reality mode in Where To? http://itunes.apple.com/app/id314785156?mt=8).

Notes:
To actually obtain the NSError object the pARk app has to be modified to use 

-startDeviceMotionUpdatesUsingReferenceFrame:toQueue:withHandler: instead of
-startDeviceMotionUpdatesUsingReferenceFrame:

This is the NSError received:
	Error Domain=CMErrorDomain Code=102 "The operation couldn’t be completed. (CMErrorDomain error 102.)"

After receiving the error callback, no further callbacks are received. cmMotionManager.deviceMotion is always nil.

The error (CMErrorTrueNorthNotAvailable) hints at a Core Location problem. Therefore we had the customer test Core Location on the affected device and verified it's working correctly: CMLocationManager updates are received and MKMapView displays the blue userLocation dot.

We tried a little modification of the pARk app: We replaced CMAttitudeReferenceFrameXTrueNorthZVertical by CMAttitudeReferenceFrameXMagneticNorthZVertical and it worked fine. So only the CMAttitudeReferenceFrameXTrueNorthZVertical mode is affected.

Then we had the customer reset "All Settings" using General => Reset => All Settings and the problem disappeared. Apparently there is some corrupt system setting that triggers this bug.

Comments

Added comment

We've been contacted by a customer who experiences the same CMErrorTrueNorthNotAvailable error on iOS 7.0.3 on an iPhone 4 (iPhone3,1). Please let us know quickly if there's anything we should test on that customer's device.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!