Constant boxWorld->Step causes b2Body.position to "shake"

We're using Box2D for our iPhone game and our player's b2Body was shaking back and forth when moving. We tracked the problem down to the fact that we were applying a variable time step to boxWorld->Step.

We were following code we've seen commonly used in the Box2D community so were surprised that this was a problem. Here's the code calling Step:

Code:
-(void) increment: (ccTime) step {
   //It is recommended that a fixed time step is used with Box2D for stability of the simulation, however, we are using a variable time step here.
   int32 velocityIterations = 8;
   int32 positionIterations = 1;
   
   // Instruct the world to perform a single step of simulation. It is generally best to keep the time step and iterations fixed.
   boxWorld->Step(step, velocityIterations, positionIterations);
}


We pass the actual time between frames which caused the b2Body to shake (app runs at 60 fps). With a constant step = 1.0/60.0, the shaking goes away.

So our questions to the community are these.

1) If the above variable step code is common in the Box2D community, then why does our fairly simple app have a problem with shaking?
2) Is there something we should be doing different so we can have a variable time step?
3) What is the norm for iPhone games using Box2D: variable or constant time step?

Thanks
In the past I have tested Box2D for a variable frame rate. It should work ok. However, you need to prevent very large time steps because this will lead to instabilities. I would clamp the time step at 15Hz.

On the other hand, you should consider using multiple time steps to keep the step size constant.
Thanks for recommending that I do what I knew I should be doing all along. I implemented a time accumulator so I track actual time while implementing a constant physics step. When I actually looked into it, the solution was much easier than I had worried about.

RTFM....as they say...

I should have looked as this link all along: www.gafferongames.com/game-physics/fix-your-timestep/

Thanks,
Anthony

Original thread: https://box2d.org/forum/viewtopic.php?t=4219