-
Notifications
You must be signed in to change notification settings - Fork 688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[health 10.1.1] Health.hasPermissions don't works propely #939
Comments
I have the same problem. Did you manage to fix it? |
No. I downgraded to 9.0.0. For some reason, this version works, but the last doesn`t. I want to show popup, if the data reading restricted for me, because the iOS don't show embedded popup after the first time |
Any fix? |
hey there, "As Apple HealthKit will not disclose if READ access has been granted for a data type due to privacy concern, this method can only return null to represent an undetermined status, if it is called on iOS with a READ or READ_WRITE access." |
checking if write permission of steps is granted on iOS (Apple health) is actually allowed by Apple, but for some reason |
Having same issue |
Having the same issues on 11.1.0 && 11.1.1 Health().hasPermissions(
[HealthDataType.BODY_TEMPERATURE],
permissions: [HealthDataAccess.WRITE],
); Problem was observed on iOS (13, system 17.7) but, I'm currently not able if something on android is wrong because got stuck on this for a long time now. |
Currently I'm going to check if the version 9.0.0 is working as @ifuterman suggested it does |
Ok before that I tried version 10.0.0 and Edit 10.2.0 works as intended too, something was broken along the way |
I found the reason and made a PR. But we need to wait for approval. Then I'll do the adaptation for Android I'll do the fix for Android :) |
iOS emulator version 17.2
Emulator
Please complete the following information for each phone and/or emulator you're experiencing this bug on:
Describe the bug
Regardless of the outcome, the result of the execution is always null
To Reproduce
Expected behavior
If I have access to the parameter the result of the Health().hasPermissions needs to be not null; the result of the Health().requestAuthorization should depend on the request result.
Actual behavior
The result of the Health().hasPermissions is always null, even if I check specific allowed parameters with read access.
And I can read this parameter. Health().requestAuthorization always true
Flutter doctor
[✓] Flutter (Channel stable, 3.19.3, on macOS 14.3.1 23D60 darwin-arm64, locale ru-IL)
• Flutter version 3.19.3 on channel stable at /Users/iosiffuterman/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ba39319843 (4 weeks ago), 2024-03-07 15:22:21 -0600
• Engine revision 2e4ba9c6fb
• Dart version 3.3.1
• DevTools version 2.31.1
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Users/iosiffuterman/Library/Android/sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15C500b
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.3.6)
• IntelliJ at /Applications/IntelliJ IDEA 2.app
• Flutter plugin version 78.4.2
• Dart plugin version 233.15026.12
[✓] VS Code (version 1.85.1)
• VS Code at /Users/iosiffuterman/Downloads/Visual Studio Code.app/Contents
• Flutter extension can be installed from:
🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (4 available)
• iPhone Iosif Futerman (mobile) • 00008120-00181D0E0A70201E • ios • iOS 17.3.1 21D61
• iPhone 15 Pro (mobile) • EA6722F7-AF28-448E-8D7E-29F119F72565 • ios • com.apple.CoreSimulator.SimRuntime.iOS-17-2 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.3.1 23D60 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 123.0.6312.87
[✓] Network resources
• All expected network resources are available.
• No issues found!
The text was updated successfully, but these errors were encountered: