我正在尝试获取过去一个月的所有心率样本,并从中提取时间和值。到目前为止,我有以下方法:funcgetThisMonthsHeartRates(){print("funccalled")letheartRateUnit:HKUnit=HKUnit(from:"count/min")letheartRateType:HKQuantityType=HKQuantityType.quantityType(forIdentifier:.heartRate)!//predicateletstartDate=Date()letendDate=Date()-1.monthletpredicate=HK