This project has the aim to test and demonstrate the impracticality of a system capable of converting the acceleration in position.
In theory, with a double integral it is possible to derive the position passing through the acceleration, however, the drifting is high and the error is accumulated very quickly.
Moving the smartphone, the resulting position is just visible in the first 2-3 seconds, after which the error accumulates too fast to notice the movements.
The result is shown in a SceneKit View in a 3D space.
However, implementing a reliable pedometer system, it may be possible to reset the position and evaluate the motion carried.
Unfortunately implement a pedometer smartphone held in one hand it is difficult and subject to many errors or inaccuracies.
Feel free to experiment with this project.
Have fun.