Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Cordova 如何使用ionic和health kit修复血压查询_Cordova_Ionic Framework_Ionic4_Healthkit - Fatal编程技术网

Cordova 如何使用ionic和health kit修复血压查询

Cordova 如何使用ionic和health kit修复血压查询,cordova,ionic-framework,ionic4,healthkit,Cordova,Ionic Framework,Ionic4,Healthkit,我正在建立一个Ionic V4应用程序,并试图在图表中显示收缩压和舒张压。因此,我正在尝试使用health kit在链接后查询我的Apple health应用程序 到目前为止,这些查询对于步骤、活动、大小和所有内容都很有效,但对于血压却不起作用。 以下是我的构造函数,它通过加载页面启动身份验证: 建造商(私人健康套件:健康套件,私人plt:平台){ } 函数loadHealthData在对健康应用程序的查询进行身份验证后启动: loadHealthData() { const bloodPre

我正在建立一个Ionic V4应用程序,并试图在图表中显示收缩压和舒张压。因此,我正在尝试使用health kit在链接后查询我的Apple health应用程序

到目前为止,这些查询对于步骤、活动、大小和所有内容都很有效,但对于血压却不起作用。 以下是我的构造函数,它通过加载页面启动身份验证:

建造商(私人健康套件:健康套件,私人plt:平台){

}

函数loadHealthData在对健康应用程序的查询进行身份验证后启动:

loadHealthData() {

const bloodPressureOptions = {
      startDate: new Date(new Date().getTime() - 24 * 60 * 60 * 1000), 
      endDate: new Date(),
      correlationType: 'HKCorrelationTypeIdentifierBloodPressure',
      unit: 'mmHg'
    }
    this.healthKit.queryCorrelationType(bloodPressureOptions
    ).then( value => {
      console.log('blood pressure data: ', value);
    }, err => {
      console.log('error getting blood pressure: ', err);
    });
}
不幸的是,虽然我的健康应用程序中有许多血压数据,但记录的值始终为空。 当我将“HKCorrelationTypeIdentifierBloodPressure”添加到读取权限时,我得到一个错误,无法授权。所以我读到它可以通过获得收缩和舒张的权限,并做相关,而不是这两个权限。 我还试着只对收缩压和舒张压进行抽样调查,但结果也是空的。 此外,我看到在我的健康应用程序中,我自己的应用程序没有列在血压权限中,但我对此一无所知


我真的非常感谢任何人在这个问题上的帮助

你能解决这个问题吗?如果是,怎么做?
loadHealthData() {

const bloodPressureOptions = {
      startDate: new Date(new Date().getTime() - 24 * 60 * 60 * 1000), 
      endDate: new Date(),
      correlationType: 'HKCorrelationTypeIdentifierBloodPressure',
      unit: 'mmHg'
    }
    this.healthKit.queryCorrelationType(bloodPressureOptions
    ).then( value => {
      console.log('blood pressure data: ', value);
    }, err => {
      console.log('error getting blood pressure: ', err);
    });
}