Try DiceShaker . You will need to use the "Instant Motion Isolation from Acceleration Data" code in Listing 4-6 of the motion events (also called high -pass filter computation) to detect the acceleration provided by the user.
EDIT: The accelerometer constantly provides gravity readings as the accelerometer works with a bunch of springs that determine the force component (in the direction of each spring length) by increasing / decreasing the spring length. Therefore, simply remove the constant gravity component (the labor force that ALWAYS works) to detect the change provided by the user (hence the name high-pass). Fortunately, we do not need to figure out how this happened because Apple did the hard work and gave the equations in its documentation!
source share