Does the iPhone accelerometer detect side to side movement?

I'm programming a game in Lua, and I wish to find out whether or not the iPhone accelerometer can detect side to side movement with no angular rotation. I'm not actually sure what the accelerometer measures, and unsure if this task is feasible.

Yes, if it involves acceleration. The device measures local acceleration, ie from the reference frame of a body in free fall (0 g in that case).So on a table it measures 1 g. But if you slowly slide it left or right or back and forth on the table without tilting it, it still reads a steady 1g. But if you tilt the phone, now the 1 g is applied in different directions, which the accelerometer can detect, and software can resolve these acceleration directions and magnitudes into which way the phone is pointing. This is then used to control screens, control toy helicopters and quadro copters, control direction of toy electric cars, control games, etc. So if you quickly moved the phone on the table, g forces would be applied to the sensor, which also could be used for some sort of control. But the most popular way is to just tilt the phone, because you don't have to keep accelerating to keep an output action going.

I verified the above with the android app Bluetooth RC car controller (free).It shows a screen with arrows for direction, and illustrates tilting motions versus lateral accelerations flat on a table (both work, but of course the lateral motions cause only transient arrow changes).