Is it possible to run accelerometer of iPhone in background?

后端 未结 3 1227
轮回少年
轮回少年 2021-01-31 12:29

I want to use accelerometer of iPhone to get the log file of accelerometer value (maybe for 24 hours). Is it possible to let accelerometer runs in background while other applica

3条回答
  •  被撕碎了的回忆
    2021-01-31 12:39

    You can do it now, if your app is allowed to run in the background for other reasons. See the Core Motion API's startAccelerometerUpdatesToQueue:withHandler: method here.

提交回复
热议问题