我有一个HKLiveWorkoutBuilder
跟踪户外跑步。我还可以LocationManager
使用HKWorkoutRouteBuilder
.
我HKQuantityTypeIdentifier.distanceWalkingRunning
通过workoutBuilder(_ workoutBuilder: HKLiveWorkoutBuilder, didCollectDataOf collectedTypes: Set<HKSampleType>)
委托方法获得。谁能告诉我,这些值是否仅由 CoreMotion 生成,或者 Apple 是否也将我添加的 CLLocations 考虑在内?由于您在没有 GPS 的情况下也能获得此值,因此我不确定 Apple 是否将 GPS 用于计算距离。
如果没有,我如何将我的 LocationManager 计算的距离添加到我的锻炼中?