Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Core Motion in the background?

Will Core Motion framework work while the app is in the background?

like image 206
Plato Avatar asked Feb 07 '11 03:02

Plato


1 Answers

The Core Motion framework allows access to historical data for CMPedometer data, so if your app is only using this there is no need to run in the background.

I have been playing around with CM the last week and in my testing if you have an active query running when your app is sent to the background, the query handler receives a flood of events (that occurred while the app was suspended) upon returning to the foreground. I don't know how many events will be cached, and I haven't seen anything in the docs about this.

This behaviour seems to be sufficient. I can't think of a use case for Core Motion where you need constant background access, historical CMPedometer data doesn't suffice, and fits within the App Store guidelines.

like image 132
jjatie Avatar answered Sep 21 '22 15:09

jjatie