Use Core Motion and many math functions.
I will assume (for which I am probably mistaken): if you want to capture circular motions (using a device to draw a circle in the air in the same plane), take regular samples (> 20 Hz) and store the maximum values ββof x, y and z in the array each (recognize in all 3 planes). If you want the gesture to be 5 seconds, keep 100 samples (at 20 Hz). Then analyze if any of the three arrays has values ββthat change sinusoidally. If so, you have a gesture.
I assume that this is a bit of trial and error, or draws a circle on paper and guesses the values ββof the accelerometer during the movement.
I hope you find the answer. I am already very interested.
source share