我試圖按照文檔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 –