Closed dopplerDistortion closed 5 years ago
@dariosalvi78 did you have time for this issue. I need suggestions to fix this :/
let me try this use case on my phone and I'll let you know
Ok thank you!
let me try this use case on my phone and I'll let you know
any updates?
I'd love to give you some, but I'm lost in the stupid certificates. Again.
I've managed to execute the following test:
All as expected.
This is ok for me too till 6th step. But after that I will add three more step for ios (no problem on android)
7- if the Auth is false health.requestAuthorization(['steps'], successCallback, errorCallback) 8- healthApp doesn't come up for reauthorization 9- succesCallback -> null
I see, I'll try again after the holidays...
It appears to be a normal Health Kit behavior. It is explained under Discussion headline in the documentation link below. I think this information should be in your documentation also. This issue can be closed. Have a nice holiday!
https://developer.apple.com/documentation/healthkit/hkhealthstore/1614152-requestauthorization
thanks, this is very interesting...
Hello there,
If user revokes the permissions from Apple Health we cant get any requestPrompt back. We are requesting the permission with this function on our register loop.
permHealth() { this.health .isAvailable() .then((available: boolean) => { console.log(available); this.health .requestAuthorization([ 'height', 'weight', 'blood_glucose', 'blood_pressure', 'steps' ]) .then((res) => { this.navCtrl.setRoot(GenderPage); }) .catch((e) => console.log(e)); }) .catch((e) => console.log(e)); }
After that we are controlling the request in a particular page with this function
permHealth() { this.health.isAuthorized([ 'height', 'weight', 'blood_glucose', 'blood_pressure', 'steps' ]).then((data)=>{ console.log(data); if(data == false){ this.health.requestAuthorization([ 'height', 'weight', 'blood_glucose', 'blood_pressure', 'steps' ]).then((res)=>{ console.log(res); }).catch((err)=>{ console.log(err); }); }else{ console.log("auths"); } });
If user revokes the permmissions second function is not prompting permission modal from Apple Health. err returns null and it is working on as expected on Android
my Ionic info
`Ionic:
ionic (Ionic CLI) : 4.3.1 Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.2.0
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) Cordova Platforms : android 7.1.2, ios 4.5.5 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.2.3, (and 20 other plugins)
System:
Android SDK Tools : 26.1.1 (/Users/goksenin/Library/Android/sdk) ios-deploy : 1.9.4 NodeJS : v10.13.0 (/usr/local/bin/node) npm : 6.4.1 OS : macOS Xcode : Xcode 10.1 Build version 10B61`