Skip to content
Alvyn Duy-Khoi Le edited this page Jan 7, 2022 · 4 revisions

Health app

Diagram

img

Authorization flow

  1. Open app.
  2. Check HealthKit is available (IsAvailable).
    1. If no, show App not supported on iPad.
  3. Ask for permissions (InitHealthKit, built-in method will automatically skip if already prompted)
  4. Check for permissions (AuthStatus)
    1. If no write permissions, show a page that prompts for the permissions.
    2. If no read, but write, will have to technically operate without knowledge.
  5. Redirect to app

Hints

  • Missing data

    If you are observing missing weight data from other sources, please make sure you have granted WeightTracker the correct read permissions (“ALLOW “WEIGHTTRACKER” TO READ) in Settings > Health > Data Access & Devices > WeightTracker.

  • Missing permissions

    Please allow all operations to your Apple Health app in Settings > Health > Data Access & Devices > WeightTracker.

Limitations

isAvailable - HealthKit is not available on iPad. https://developer.apple.com/documentation/healthkit/hkhealthstore/1614180-ishealthdataavailable

getAuthStatus - Obtain write auth status to Health app. Cannot know read status. https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatusfortype?language=objc

Resources

Clone this wiki locally