2
私はIOS 11、WatchOS 4.0およびHealthKit
と致命的なエラーを取得しています:IOS Healthkit心拍サンプルメタデータHKPrivateHeartRateContext致命的なエラー
fatal error: *** An error occurred while adding a sample to the workout: Optional("Invalid metadata key: _HKPrivateHeartRateContext")
私は心拍数のサンプルの任意のメタデータを設定していません。私はそれらを保存ストリーミングのサンプルを取得した後
let quantityType = HKObjectType.quantityType(forIdentifier: HKQuantityTypeIdentifier.heartRate)
:
func saveAddedSamples(_ workout: HKWorkout) {
if !self.heartRateSamples.isEmpty {
self.healthStore.add(self.heartRateSamples,to: workout) { (success: Bool, error: Error?) -> Void in
guard success else {
fatalError("\n *** An error occurred while adding a " +
"sample to the workout: \(String(describing: error?.localizedDescription))")
}
self.heartRateSamples.removeAll()
}
}
}
任意のアイデア私は私のサンプルタイプを設定しているストリーミングクエリで
?