I would like add a this Apple example [AccelerometerGraph] the ability to store the data in a file until the app isn’t closed. Without locking issues and other crappy problems of real time data collection.
Any idea, sample or something that a semi newbie can play with?
you could log the accelerometer data into an NSMutableArray as it hits and then when the app is being closed write that array to a file with:
just want to make sure you dont store every single entry or it could get large very fast. Do some checking on the timestamp in the acceleration object in
make it log every couple of seconds depending on how long you are going to be running it. (this method would probably not be wise to run for long lengths of time without throttling it, or doing some other array manipulations so that the entire array isnt held in memory through out the life time of the app)
quick way to read the file you have written.