I've been using gravity() during a scene's setup to establish the starting position of the device. It works great on my iPad Air. My iPhone 5, however, doesn't seem to get any values from gravity() when run during setup.
To test this, check out the following code: https://gist.github.com/andrewschmidt/8293953
Run on my iPad Air, tilted mostly vertical, this outputs:
(0.01366471778601408, -0.8423394560813904)
Run on my iPhone 5, in any position:
(0.0, 0.0)
It's worth noting that in my actual script, the gravity() call made after the scene has begun looping works fine on the iPhone. It's only in setup that it doesn't return anything.
I don't know which is the intended behavior, but it can't be both!