これはios HealthKitのnativescriptサポートではありません。私はapiで作業しようとしています。apiを使ってangular2 nativescriptからisHealthDataAvailableを取得する方法
私はisHealthDataAvailable()のために、単純なブール値を取得しようとしています開始するには:
どのように? declare var NSBundle:any;
constructor() {
if (Platform.isIOS){
let healthStore = NSBundle.mainBundle.HKHealthStore();
let is_avail = healthStore.isHealthDataAvailable();
}
}
(in promise): TypeError: NSBundle.mainBundle.HKHealthStore is not a function. (In 'NSBundle.mainBundle.HKHealthStore()', 'NSBundle.mainBundle.HKHealthStore' is undefined)
この
はNativeScriptからの引用である:私は異なる物乞い https://www.nativescript.org/blog/how-to-enable-healthkit-in-your-nativescript-applicationvar healthStore = HKHealthStore.new();
And this is how to use HealthKit API in NativeScript. Yes, it is THAT simple.
... HKHealthStore
の生活は、私が提案するあなたの他の質問に私の答えを参照してくださいいない
ボーイズで見つけることができますか?あなたはstackoverflowを好むが、あなたはあなたのフレームワークにコメントすることに興味があるようには思わない。 nativescriptの使用がプライムタイムのために準備ができていないことが明らかになってきています。あなたのドキュメントは古くなっています – Tampa