Core Moiton API is mostly available in WatchOS2
And the states of watch can track
Available through CMAccelerometer
Challenges
Best practices
Use performExpiringActivityWithReason(_:, usingBlock:)
when being informed the task is being suspended
CMSensorRecorder
available in iOS 9
CMSensorRecorder
to start the recordingaccelerometerDataFrom(_:, to:) -> CMSensorDataList
to retrieve the data from a date to a date
Consideration of using
performExpiringActivityWithReason(_:, usingBlock:)
to monitor if the task is suspended.Related session : Introducing WatchKit for watchOS 2
Measure
New property currentPace
of CMPedometerData
instantaneous pace in unit of second/meter accompanied with live pedometer updates
Cadence in sports involving running is the total number of 'revolutions per minute' (RPM), or number of full cycles taken within a minute, by the pair of feet, and is used as a measure of athletic performance.
New property cadence
of CMPedometerData
Availability in devices
Used to measure relative altitude in floor-scale
use CMAltimeter
of
startRelativeAltitudeUpdatesToQueue(_:, withHandler:)
first sample after 2.6s
after than the samples after 1.3s
considering using core motion to improve UX of the app
say in music app
we detect the user activity and select the pre-defined playlists. Then according to performace of user activities , the app changes the songs for cheering the user up. Finally we consolidate the data and shows these to the user.