Dev:SBAccelerometerInterface

SBAccelerometerInterface is a singleton class that can deliver accelerometer events to registered clients. This class is available starting from version 2.2.

Turn on accelerometer events within SpringBoard
When the SpringBoard is visible (i.e. the active display stack is empty), the accelerometer will be turned off entirely. The following code can force accelerometer events to be reported even when there is no running apps:

To obtain the current orientation, listen to the com.apple.springboard.rawOrientation Darwin notification and use the code below to obtain the orientation: