我试图按照文档https://github.com/NativeScript/sample-iOS-HealthKit,让它面对它是记录不足... tsk tsk tsknativescript,angular2和heaththkit - 找不到HKHealthStore;
我有我的xcode项目启用healthkit。
每本示例https://github.com/NativeScript/sample-iOS-HealthKit/blob/master/app/components/main/main.ts文件我试图导入:
var healthStore: HKHealthStore;
cant find name HKHealthStore
如何我导入正确?
谢谢
留给我更糊涂了。是否没有与healtkit合作的指南? – Tampa
HealthKit只是一个内置的iOS SDK,因此它的工作原理类似于在NativeScript中访问任何其他本机API。为了让生活更轻松,您可以为原生SDK添加类型,这正是我认为您需要的。如果您需要更多关于HealthKit使用方法的一般性帮助,可以研究Apple的SDK文档(它们非常好),或者查看我是如何实现Cordova插件的:https://github.com/Telerik-Verified -Plugins/HealthKit –