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