objective-cxcodetvossiri-remote

Detecting motion gestures with siri remote tvOS


I am developing an app for tvOS and I want when the user shakes the remote, or moves it in a downward slash, that an event gets triggerred. But apple's documentation mostly focuses on registering button presses and the focus engine.

Can anyone help me with how I can access the accelometer?

Thank you for your help


Solution

  • To use the motion sensing aspects of the Siri Remote, you need to treat it as a game controller. See Working with Game Controllers in App Programming Guide for tvOS and the GCMotion class.