Getting accelerometer data from an iPhone, from a command-line program?
Please view the gist below:
https://gist.github.com/969112
Essentially, I am trying to set up a UIAccelerometerDelegate
and have it receive data from a command-line iPhone application (i.e. it's jailbroken, I'm ssh'd into the phone and compiling the above code on the iPhone itself).
The above code does not work... even though the application is sitting in it's run loop, and the UIAccelerometer
is active with it's delegate, no callback's are ever called...
I kind of at a loss as to what else could be needed. I was simply trying to ge开发者_开发技巧t the most simple "hello world" example of getting at the accelerometer data was (without involving all the bloat of the UI and running a full-on app)...
So any ideas? Thanks in advance!
I wouldn't be surprised if a UIApplication
instance was required for the accelerometer to work.
精彩评论