MetricPull

A privacy-first Apple Health export tool built for AI-powered analysis.

Apple Health can hold years of useful information about activity, sleep, nutrition, heart health, body measurements, and more. But moving that data into a spreadsheet or a user-chosen AI tool is harder than it should be. Native exports are unwieldy, and simpler CSV exports often strip away the context needed to interpret the numbers responsibly.

MetricPull is a privacy-first Apple Health export platform built for AI-powered analysis and modern health data workflows. It transforms HealthKit data into structured, context-rich exports that preserve timestamps, units, source and device information, and other critical metadata. Each export includes rich metadata and optional Analysis Kits that help AI assistants, spreadsheets, scripts, and research tools interpret health data more accurately, while all processing remains on the user’s device.

at a glance

70
Apple Health metrics
3
Export modes
300+
Automated tests
On-device
Processing

the problem

Apple Health is excellent at collecting information, but it is not designed for open-ended analysis outside the Health app.

The native export is a large XML archive that takes significant work to understand. More convenient exports can introduce a different problem: they provide values without enough context. A blank cell may be treated as zero. Pounds may be mistaken for kilograms. A partial day may be compared with a complete one. Repeated samples from different apps may be counted as independent events.

Provenance is also more nuanced than it first appears. The app or device that saved a sample may not be the hardware that measured it. A watch can generate a reading that is written to Apple Health by a paired phone. When those distinctions disappear, spreadsheets and AI systems can form confident conclusions from ambiguous data.


the solution

MetricPull is an intelligent export pipeline rather than a one-size-fits-all file converter.

Users select the health data and date range they care about, choose the level of detail, preview the result, and export only when ready. HealthKit-aware formatting applies the correct units, aggregation, dates, and timestamp behavior for each kind of data.

For analysis workflows, Analysis Kit packages the CSV with structured metadata and plain-language instructions. The package explains column meanings, units, missing-data rules, date or timestamp formats, provenance, known limitations, and other details a spreadsheet, script, or external AI tool needs to interpret the export more carefully.

Reusable presets make recurring workflows practical without turning the app into another health-data platform. MetricPull organizes and explains the data; it does not diagnose, prescribe, or run an AI model itself.


current capabilities

MetricPull currently supports:

  • 70 Apple Health metrics spanning body measurements, activity, heart health, sleep, vitals, and nutrition
  • Summary exports for daily, weekly, or monthly trends
  • Log Entries for readable individual measurements, events, and supported sleep records
  • Raw Samples for detailed HealthKit records where supported
  • Detailed Sleep Records for each stored sleep-analysis segment when Time Asleep is selected alone
  • Quick Metrics charts and rolling comparisons without exporting
  • Reusable built-in and user-created presets
  • Configurable dates, aggregation, column order, and Imperial or Metric units
  • AI-ready Analysis Kits for every supported export mode
  • CSV previews before anything is shared

The product deliberately uses different export modes because a daily trend, a logged event, and a stored HealthKit sample answer different questions.


choosing an export mode

Each mode preserves a different level of detail, so users can choose the format that best matches what they want to understand.

Mode What it provides Best for
Summary Daily, weekly, or monthly aggregates Trends and comparisons
Log Entries Readable individual measurements, events, and supported sleep records Reviewing specific records
Raw Samples Detailed HealthKit records with precise timestamps, provenance, and identifiers where available Technical analysis and record-level workflows

what makes MetricPull different

it preserves the right level of detail

Summary exports make long-term trends manageable. Log Entries preserve multiple readings or events within a day. Raw Samples retain precise HealthKit record timing and source details. Detailed Sleep Records preserve stored sleep stages and attributed nights without reconstructing or merging them into inferred sessions. Users can choose the representation that matches the analysis rather than forcing every metric into one table shape.

it treats provenance as data

For supported quantity and sleep Raw Samples, MetricPull separates the source that saved a sample from the hardware Apple Health reports as generating it. Those fields can differ, and the export explains that distinction instead of presenting a single misleading “device” label.

it supports reliable deduplication

Generic quantity and Detailed Sleep Raw Samples include the HealthKit sample UUID. That gives overlapping exports a record-level identity within the same Health database instead of asking an analyst to guess whether similar rows are the same stored sample. Detailed Sleep guidance still preserves overlapping rows instead of reconciling them by timestamps alone.

it respects time semantics

Raw timestamps retain the local UTC offset active for each sample, including daylight-saving transitions. Interval-capable samples keep both start and end timestamps. Readable Log Entries use local wall-clock time and explicitly direct analysts to Raw Samples when exact offsets matter.

it ships context with the data

Analysis Kits describe units, columns, missing values, provenance, record identity, date behavior, and known limitations. The goal is not to guarantee a correct conclusion; it is to remove avoidable ambiguity before analysis begins.


technical highlights

MetricPull is built as a native iPhone and iPad app using SwiftUI, HealthKit, Observation, and Swift Charts.

The engineering centers on a few durable ideas:

  • A read-only dependency boundary separates production HealthKit access from tests and deterministic screenshot fixtures.
  • A generic discrete-quantity architecture supports multiple record types through shared fetching, schemas, formatting, metadata, and instructions.
  • Reusable schema generation keeps CSV columns, machine-readable metadata, and human-readable guidance aligned.
  • Dedicated paths preserve established Blood Pressure, Weight, and Workout exports while adding stored-segment Detailed Sleep Records without changing Sleep Summary.
  • Deterministic automated tests pin file output, routing, units, metadata, provenance, and Analysis Kit packaging.
  • The app has no backend or third-party runtime dependency.

The interesting work is less about drawing a CSV row and more about designing a stable contract between HealthKit’s data model, a human-readable file, and the tools that consume it.


privacy

Privacy is an architectural constraint, not an optional setting.

  • HealthKit access is read-only.
  • Processing and export generation happen on device.
  • There are no accounts.
  • There is no MetricPull cloud synchronization or backend.
  • There are no analytics or tracking SDKs.
  • Health data is not uploaded automatically.
  • MetricPull creates an export only after the user requests one.
  • The user chooses the destination through the iOS share sheet.

After an export is shared, the privacy practices of the chosen destination apply. MetricPull makes that boundary explicit and leaves the decision with the user.


lessons learned

HealthKit provenance is more subtle than a single source label suggests. Writer applications, paired devices, measuring hardware, imported samples, and overlapping records all affect how a value should be interpreted.

AI-ready data also requires much more than a clean CSV. Units, missing-data meaning, time zones, aggregation, sample identity, and limitations are part of the product. Without that context, a technically valid file can still be analytically misleading.

Finally, durable architecture becomes more valuable as a product grows. The shared quantity pipeline and dedicated sleep-record path made it possible to expand record exports while preserving older schemas and keeping metadata, instructions, UI availability, and tests in sync.


what’s next

Future work will continue along a few themes:

  • Supporting additional HealthKit record types
  • Improving provenance and data-quality guidance
  • Expanding analysis and visualization workflows
  • Making AI-assisted review more useful without weakening privacy or interpretive safeguards
  • Continuing to improve the clarity and reliability of exported data

The goal remains the same: make Apple Health data genuinely useful outside the Health app while preserving the context needed to understand it.


screenshots

Support · Privacy Policy