Question

I'd like to build a pedometer which runs in the background on iOS5 devices. I understand the Core Motion framework can be used to accomplish this, like Nike+ is doing with their pedometer app.

I've also heard that there are restrictions on when Core Motion can be used in the background, specifically the OReilly's iOS 5 book says, "In iOS5 Core Motion is legal while your app is running in the background. To take advantage of this your app would need to be running in the background for some other reason."

This seems strange to me. Does this mean I have to have an "excuse" to use Core Motion in the background?

Était-ce utile?

La solution

Yes, in order to run your app in the background, your app has to be in one of a few blessed categories: music, location, VOIP.

EDIT:

You can find the docs here: https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/CoreData/Articles/cdRelationships.html

Autres conseils

Just make it location aware. Log the pedometer activity and the GPS location.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top