1

I am using CMMotionManager to record attitude data on a watch app. My problem is that when the watch is rotated too far the screen turns off and it pauses recording. I haven't been able to find a way to either keep the screen waked or to record when it is off. Any help would be great

  • I'll take that as a no then – user7277596 Apr 09 '19 at 13:18
  • Don't give up so easily. You would generally get a downvote if the format of your question looks noobish. Like, you just asked for help and have shown nothing of what you have done. – staticVoidMan Apr 09 '19 at 13:32
  • But the spirit in your question is good so +1 from me. Now... check [similar question](https://stackoverflow.com/q/46148399/2857130). Generally you would want to enable a background mode to continue receiving updates but there seems to be an Apple bug with this whole thing (_follow all the comments in the linked question_) – staticVoidMan Apr 09 '19 at 13:36

1 Answers1

2

If you would consider what you're creating a "workout" app you should be able to use a HKWorkoutSession which will allow you to keep the app active, even when the screen turns off. Fair warning that Apple can and will reject your build if they determine you aren't using that function correctly.

Here is the documentation from Apple on HKWorkoutSession

and here is an example on how to get started.

Zachary Bell
  • 559
  • 4
  • 18