The native iOS app for HealthLog, the self-hosted health tracker you run on your own server.
Your health on your iPhone. Your data on your server.
Download on the App Store | healthlog.dev | iOS docs | Server project | Support
HealthLog is a health tracker for iPhone, iPad and Apple Watch that stores everything on a server you run yourself. It keeps Apple Health (HealthKit) in two-way sync with that server, reminds you about your medications, and shows blood pressure, weight, glucose, sleep and your other readings as charts you can actually read. It is meant for people who self-host things: in a homelab, on a NAS or on a small VPS.
The app needs a HealthLog server to talk to. It has no built-in server and no default address. On first launch you enter the URL of your own instance, and every reading you log lands in the same database your HealthLog web app reads from. If you don't have a server yet, you can look around on the public demo first (see below).
This repository holds the full source of the app. Each release here matches an App Store build, and the CHANGELOG lists what changed.
The easiest way is the App Store. HealthLog costs a small one-time price there, with no subscription and no in-app purchases. The price helps cover Apple's yearly developer fee. If the price is a problem for you, write to [email protected] and you'll get a free code, no questions asked. The App Store announcement has the background.
There are two free alternatives. The TestFlight beta gets new builds before the App Store does. You can also build the app yourself from this repository; the steps are further down.
Since 1.7 HealthLog is a universal app, and the iPad version costs nothing extra. In a wide window a sidebar holds every section, grouped into Journal and Findings, and the "+" for logging sits at the top right. Home, Insights, metric pages, labs and documents use the width: the chart beside its summary, the lab markers as a table with the selected marker's history next to it, a document's preview beside the list. Narrow windows and Split View look like the iPhone. The pointer and a hardware keyboard work too.
The iPad talks to your server like the web app does. Apple Health stays on the iPhone, so the iPad does not read or write HealthKit. Medication reminders are planned on one device: the iPad schedules them only when no iPhone on your account has been seen for a week, or when you turn them on there.
- Install the app and open it. The first screen asks for a server address.
- Enter
https://demo.healthlog.dev. - Sign in with the demo credentials from the demo section on healthlog.dev.
The demo holds about a year of synthetic data. You can browse all of it, but changes are not saved.
- Home. The day in one read. The score rings stand at the top with a sentence from the daily briefing, and "To do today" names your next dose. Swipe a row to the left to do it, to the right to put it off. Below come the tiles you picked and the charts for weight, blood pressure, pulse, sleep and the rest, the same set and order as on the web. When the server needs something from you, a consent or a missing setting, it asks in one line at the top. A "+" sheet lets you log any metric your server tracks.
- A page for every score. Readiness, sleep score, health score, recovery, strain and stress each open on their own page: the ring from the tile, the parts behind the number in their bands, and the course over 30 days, 90 days or everything. Insights starts with one compact row of all your scores.
- Apple Health sync in both directions. Weight, blood pressure, heart rate, HRV, blood oxygen, glucose and mood (State of Mind) go both ways. Steps, activity, workouts, sleep stages and ECG recordings go from Apple Health to your server. Every write carries an external ID, so the server and Apple Health don't copy each other's entries back and forth. The table below has the details.
- Medication tracker and reminders. Daily, weekly, cyclic, rolling and as-needed schedules. You can correct past intakes. Due doses show up as Live Activities, and the buttons in a reminder notification record a dose without opening the app. GLP-1 medications also get drug-level curves calculated from your actual doses, titration plans, injection-site tracking and a side-effects log.
- Timeline. Conditions, medications with their dose changes, vaccinations, doctor visits and your own values on one time axis, from a week to everything. On the iPhone it turns sideways in full screen. Needs a server that offers it.
- Charts. Every metric has a detail view with a linear or logarithmic axis, a time range picker, reference bands from the ESC/ESH and ADA guidelines, and VoiceOver descriptions. Reference ranges and scores link to the sources they are based on.
- Insights and an optional coach. A health score breakdown, correlation cards, a daily briefing and a coach you can ask about your numbers. All AI features are off until you turn them on (see Privacy).
- Apple Watch, widgets and Shortcuts. A Watch app with complications, home screen and lock screen widgets (one of them configurable, with a daily trend), App Intents for Siri and Shortcuts ("Did I take my medication?"), and Spotlight search for your medications.
- Sharing with your doctor. You choose what is included, the time range and the format: a link you can revoke, a PDF report, or a ZIP of the record. There is also a doctor report based on FHIR with LOINC codes.
- Imaging. X-ray, CT, MRI, ultrasound and mammography exams get their own page next to the lab results, with body part, side, clinic and the reports filed against each exam.
- Emergency card in Apple Wallet. The emergency card you set up on your server (blood type, allergies, conditions, medications, contacts) can go into Apple Wallet with one tap. The app keeps the pass current when the card changes and asks before it removes a withdrawn one.
- Push notifications for your own server. A self-hosted server can send reminders, confirmations and the dose Live Activity through the HealthLog push relay. Pushes are sealed on your server and opened only on the phone, and the relay's keys are pinned in
Config/push-relay/. It stays off until you turn it on. - Modules. A module you switch off, on the server or under Settings, is gone everywhere in the app: tab, sidebar, links, widgets, Shortcuts and reminders. A link that still points at it lands on Home and says why.
- App icons. Besides the default icon there are Light, Holiday, Cyber and Gold, under Settings > Appearance.
The app is available in English, German, Dutch, Korean and Spanish. Translations are made in Tolgee at translate.healthlog.dev. How the app picks its language and how a new one gets in: docs/localization.md.
| Data | Direction (Apple Health) | Notes |
|---|---|---|
| Steps, active energy, walking distance, flights climbed | To the server | Today's value is read live from HealthKit, earlier days come from the server. |
| Weight, body fat, BMI, body temperature, VO₂ max | Both ways | Writes from the app carry HKMetadataKeyExternalUUID so re-reads are recognised and not duplicated. |
| Blood pressure, heart rate, resting heart rate, HRV, blood oxygen, blood glucose | Both ways | Same duplicate protection. The server is the reference for values you typed in, Apple Health for values a device measured. |
| Mood (State of Mind) | Both ways | Can be turned off in the app's settings. |
| Symptoms, resting energy, nutrition, heart events | To the server | Symptoms land in the symptom diary. Read only where your server offers the matching feature. |
| Sleep stages, walking metrics, respiratory rate and other measured values | To the server | |
| ECG recordings | To the server | |
| Workouts with heart rate detail | To the server | Sent as workout bundles. |
| Medication intakes, notes | Server only | HealthKit has no standard type for these, so the app and the web UI write them to the server directly. |
You decide per data type in the iOS permission sheet what the app may read and write. Types you don't allow stay on the phone. Deleting a reading, workout, ECG or mood entry in Apple Health removes it on your server too. Only the iPhone syncs with Apple Health; the iPad reads your data from the server.
- An iPhone with iOS 26 or later, or an iPad with iPadOS 26 or later. iPhones on iOS 18 to 25 keep version 1.5. The Watch app needs watchOS 11.
- A HealthLog server the phone can reach over HTTPS, or the demo server for a first look. Keep the server up to date: the app checks the server version and only offers features your server supports. Signing in through your instance's own login page needs server v1.32.11 or later.
- Some parts of 1.7 need HealthLog server 1.50: the asks and the single tile row on Home, the score pages, imaging, the emergency card in Apple Wallet and the guided setup for new accounts. On an older server the app shows what that server supports and keeps the earlier pages. The push relay needs server 1.49 or later.
- For the on-device coach: an iPhone that supports Apple Intelligence, on iOS 26.
You sign in to your own server, never to an account of ours. Email and password work everywhere. On a current server the app can also open your instance's login page in a secure in-app browser, so passkeys, your password manager and single sign-on work the same way they do on the web. Tokens are kept in the iOS Keychain and refresh in the background.
If you build the app yourself under your own bundle ID, you can also enable native passkeys for your host. docs/self-hosting.md explains how.
There is no HealthLog cloud. The app talks to the server you chose and to nothing else that we run. There is no developer backend, no account with us, no analytics SDK, no tracking and no advertising.
The coach is off until you choose how it should work, and you can pick none of the options:
- On the device with Apple Intelligence (iOS 26). Nothing leaves the iPhone.
- Your own provider key for Anthropic, OpenAI, Google Gemini or any OpenAI-compatible endpoint. Requests go straight from the phone to that provider, and the key stays in your Keychain.
- Your server's provider, if your HealthLog instance has one configured.
Before any health data goes to a provider, the app tells you what it sends. The full policy is at healthlog.dev/privacy.
HealthLog is not a medical device. It does not diagnose, treat or give medical advice, and it doesn't replace your doctor.
SwiftUI Views
↓
@MainActor @Observable Stores
↓
Repositories (stale-while-revalidate + Outbox)
↓
Actor-based Services (APIClient, HealthKit, Passkey, Notifications)
↓
Codable + Sendable Models
The code uses Swift 6 strict concurrency throughout. When the network is down, the Outbox queues every write in a local SwiftData store and replays it the next time the server is reachable. Each POST carries an idempotency key that is stored with the queued payload, so a retry can't create a second entry.
HealthLogCore is an internal SPM library defined in Package.swift. It holds the platform-independent layers: models, APIClient, Keychain, logger, repositories, sync and pharmacokinetics. swift build compiles it without iOS, which doubles as an architecture check: core code can't quietly pick up a UIKit or HealthKit dependency.
More detail lives under docs/: architecture, security, the API contract, and the decision log that explains the bigger choices.
The repository does not commit HealthLog.xcodeproj. XcodeGen generates it from project.yml. The SwiftPM lockfile inside the workspace is tracked, so dependency versions are pinned.
brew install xcodegen swiftlint swiftformat
git clone https://github.com/MBombeck/healthlog-iOS.git
cd healthlog-iOS
# For device builds: set DEVELOPMENT_TEAM in project.yml to your own team ID.
# Simulator builds work without it.
xcodegen
open HealthLog.xcodeproj # scheme: HealthLogYou need a Mac with macOS 15 or later and Xcode 27.2 with the Metal toolchain component (the pinned toolchain, see project.yml and CI). Device installs need an Apple Developer account; simulator builds don't.
The platform-independent core also builds without Xcode:
swift build # compiles HealthLogCoreCI holds the project to these gates: swiftlint and swiftformat --lint clean, xcodebuild build with warnings as errors, and a green test suite. TESTING.md has the exact commands and the simulator baseline.
Certificate pinning is opt-in and up to whoever runs the server. The repository ships no pins and no pinned host, because there is no built-in server to pin. A build without pinning validates through system trust, which is the normal case. If you want pinning, passkeys or universal links in your own build, provide the Info.plist keys that CertificatePinner reads (HLPinnedHosts, HLPinnedSPKIHashes, HLPasskeyRelyingPartyHosts) in your own build configuration. scripts/extract-spki.sh computes the SPKI hashes for your host. A release build crashes early if the configuration is only half there (hashes without hosts or the other way round), because that looks like pinning but isn't. Config/local.example.yml shows the shape of such an overlay.
├── HealthLog/ # iOS app target
│ ├── App/ # Entry point, AuthenticatedShell, RootView
│ ├── Cache/ # SwiftData-backed snapshots + invalidator
│ ├── DesignSystem/ # HLCard, HLText, HLSpace, HLRing, …
│ ├── FHIR/ # SpeziFHIR mapping for doctor-report export
│ ├── Intents/ # App Intents / Shortcuts
│ ├── LiveActivity/ # Medication Live Activities
│ ├── Models/ # Codable + Sendable domain types
│ ├── Pharmacokinetics/ # GLP-1 level modelling (EMA-parameterised)
│ ├── PushRelay/ # Opt-in end-to-end sealed pushes through the relay
│ ├── Repositories/ # SWR + Outbox network glue
│ ├── Screens/ # SwiftUI screen surfaces
│ ├── Services/ # APIClient, Keychain, HealthKit, Passkey, AI/
│ ├── Stores/ # @MainActor @Observable view-models
│ └── Sync/ # BackgroundSyncCoordinator + cluster filter
├── HealthLogWatch/ # watchOS companion app
├── HealthLogWidgets/ # Home/lock-screen widgets
├── NotificationServiceExtension/ # Opens sealed relay pushes on the device
├── HealthLogTests/ # Swift Testing + SnapshotTesting
├── HealthLogUITests/ # XCUITest journeys
├── docs/ # Architecture, security, API contract, ADRs
├── scripts/ # Lint/i18n gates, SPKI extractor, contract checks
├── Package.swift # HealthLogCore SPM library definition
└── project.yml # XcodeGen source-of-truth
This app is built on Stanford Spezi (spezi.stanford.edu), the open-source digital health framework from Stanford's Biodesign Digital Health group, and it deserves loud credit. Sixteen Spezi packages carry HealthLog's HealthKit integration, FHIR mapping, LLM plumbing, Bluetooth device support, scheduling, onboarding, storage and more, plus four packages from the sibling StanfordBDHG org (HealthKitOnFHIR among them). Spezi helped this project enormously. If you build health software for Apple platforms, look at it first.
Beyond the Spezi ecosystem, HealthLog iOS uses Apple's FHIRModels and the swift-openapi stack, MLX Swift, swift-markdown-ui, Pow, SQLite.swift, Point-Free's swift-snapshot-testing, and more community packages pinned in the tracked Package.resolved. All dependencies come in through Swift Package Manager under their own licenses; nothing is vendored into this tree.
The most useful things you can do:
- Run the app against your own server (or the demo) and tell me where it breaks.
- Open an issue with the build number from More > About, one line on what you tried, one line on what happened compared with what you expected, a screenshot if it's visual, and whether it happens again.
- Tell me what's missing. The roadmap follows what people who self-host actually reach for.
- Pull requests are welcome for small fixes and tests. For larger work please open an issue first so we don't duplicate effort. CONTRIBUTING.md explains the workflow and the gates, and the Code of Conduct applies everywhere. Working with AI tooling is fine; CONTRIBUTING-AI.md has the ground rules.
- Translations go through translate.healthlog.dev, not pull requests.
Questions that don't fit an issue go to the support page. If you find a security issue, please report it privately as described in SECURITY.md instead of opening a public issue. What the app does with your data is summarised in PRIVACY.md.
HealthLog iOS is licensed under the PolyForm Noncommercial License 1.0.0, the same license as the server project. The source is available, and you may use, build and modify it for noncommercial purposes. Commercial use needs a separate agreement. The third-party packages the app is built with are listed with their licenses in docs/third-party-licenses.md.
App Store | Website | Documentation | Server project | TestFlight | Issues
Support the project: ♥ Sponsor on GitHub or buy me a coffee