We're interested on reading acceleromete开发者_JS百科r history on the iPhone. Most research indicates that the iPhone app needs to access and record accelerometer data directly.
It was mentioned that the an employee at the Apple genius bar can connect a device to read the pas 2 or 3 months of accelerometer data in order to determine if the phone was dropped, etc.
Is this accelerometer log accessible by the developer via the iPhone SDK? Reading this would be helpful for our application.
Does anyone know if accessing this data via the SDK is possible?
Thanks
The accelerometer chip is almost always turned off, unless turned on by specific request by an app for the duration of that app's use, in order to reduce battery drain. So there usually is no data to record.
There is nothing in the Core Motion SDK which will provide a history of acceleration data; it must be recorded by your application. Over a period of months that is probably not possible.
If such a history exists it would be accessible either:
- Directly via the iOS filesystem in an area outside your application environment which you cannot access in non-jailbroken apps.
OR
- Via a private API from the SDK which Apple would reject your app for using.
If you want to make an app which needs access to such information (assuming such information exists) you must contact Apple and ask them to grant you special privileges to use the APIs involved. They have done so before (with other private APIs) with other companies but usually big ones. Still it never hurts to try.
精彩评论