Skip to content

Read your first health data in Blueprint

Build a Blueprint that initializes HealthBridge and reads the last seven days of step samples. Complete this lesson in the editor with mock data before moving to a mobile device.

  • Install and verify HealthBridge.
  • Enable read permission for Steps under Tools > HealthBridge > Permissions.
  • Create an Actor Blueprint and place it in an empty level.
  1. In Event BeginPlay, get the game instance’s HealthBridgeSubsystem.
  2. Store the subsystem in a variable so you can reuse it.
  3. Call Auto Initialize and create its completion event.
  4. Branch on the returned success value.
  5. From the successful branch, call Read Data Type.
  6. Choose Steps from the Data Type dropdown.
  7. Set Days Back to 7 and Max Records to 100.
  8. Create the read completion event and branch on bSuccess in the returned Health Data Read Result.
  9. On success, iterate over Samples.
  10. For each sample, call Get Health Data Sample Number with key count.
  11. Display the value with Print String for this editor-only exercise.

Use the enum-backed Read Data Type node for built-in types. The raw-string Read Data path is intended for custom or newly introduced registry IDs.

  • Initialization failure: show a safe message that HealthBridge is unavailable.
  • Read failure: use the result’s Error for local development, but do not attach raw native payloads or health records to production logs.
  • Successful empty read: show a normal empty state. On iOS, this can mean no records or denied read access.
  • Successful records: process only the fields your feature needs.

Press Play in the editor. A successful graph:

  • Completes Auto Initialize with true.
  • Reports provider Mock if you call Get Provider Name.
  • Completes Read Data Type with bSuccess=true.
  • Prints one or more mock step counts.

If the graph fails, compare it with the generated examples under Tools > HealthBridge > Samples > Create Blueprint Examples.