質問

does anyone know if it would be possible to call the CMStepUpdateHandler block without waiting for the quoted number of steps? The reason I want this, is that if the user starts the startStepCountingUpdatesToQueue:updateOn:withHandler: and suspends the app, only to reopen AFTER they have finished walking, the step count will not update as it is necessary to then walk the quoted number of steps with the app in the foreground before the steps are displayed. Any help greatly appreciated. PS, see here for documentation... https://developer.apple.com/LIBRARY/IOS/documentation/CoreMotion/Reference/CMStepCounter_class/Reference/Reference.html

役に立ちましたか?

解決

Having researched this, it seems the behaviour above is default, and so opted to use the CMStepCounter query option.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top