Advanced (command line)¶
If you're comfortable in a terminal, you can build and install everything without clicking around Xcode. This mirrors what CI does. The friendly, step-by-step route is the rest of the build guide — use this page if you'd rather script it.
Experimental
faBolus is in development for experimental use and is not FDA-cleared. See Safety.
Prerequisites¶
- Xcode 16+ (full app) + an Apple Developer team id.
- XcodeGen —
brew install xcodegen(the.xcodeprojis generated fromproject.ymlvia./scripts/generate-project.sh). - Optional: the Connect IQ Mobile SDK for iOS, placed where
project.yml'sConnectIQpackage points (default../../vendor/connectiq-companion-app-sdk-ios-1.8.0). Only needed for the Garmin remote — if it's absent,generate-project.shauto-detects that and builds without Garmin. - JDK 21 —
brew install openjdk@21— only for TandemKit's oracle tests. - Optional: for the Garmin watch app, the Connect IQ device SDK + a developer key (see Build the Garmin remote).
Clone (siblings)¶
mkdir -p ~/faBolus && cd ~/faBolus
git clone --recurse-submodules https://github.com/faBolus-app/TandemKit.git
git clone https://github.com/faBolus-app/faBolus.git
faBolus consumes TandemKit via a local SPM path (../TandemKit), so keep them side by
side.
TandemKit (core + byte-exact oracle tests)¶
cd ~/faBolus/TandemKit
git submodule update --init # vendors the pumpX2 oracle + mbedTLS
./scripts/test.sh # builds the cliparser JAR + runs byte-exact tests
scripts/test.sh works around the Command Line Tools swift-testing rpath issue; the tests use
import Testing.
iOS app (build + install to a device)¶
cd ~/faBolus/faBolus
./scripts/generate-project.sh # regenerate the .xcodeproj (auto-detects Garmin SDK)
xcodebuild -project faBolus.xcodeproj -scheme faBolus \
-destination 'generic/platform=iOS' -configuration Debug \
-allowProvisioningUpdates DEVELOPMENT_TEAM=<TEAMID> -derivedDataPath build/DD build
xcrun devicectl device list # find your device UDID
xcrun devicectl device install app --device <UDID> \
build/DD/Build/Products/Debug-iphoneos/faBolus.app
DEVELOPMENT_TEAMis your Apple team id (the signing cert's OU). It isn't stored in the repo — pass it on the command line. For a compile-only check, addCODE_SIGNING_ALLOWED=NOand drop the team.- App Group (
group.com.fabolus.app) is shared by the app and the widget extension. It registers automatically on first signed build; entitlements are generated fromproject.yml. - The WidgetKit extension builds as a target of the same project.
Choosing what's included (env flags)¶
./scripts/generate-project.sh reads an environment variable to decide whether Garmin support is
baked into the generated .xcodeproj. When it's dropped, the ConnectIQ package/dependency and its
compile flag are stripped from a derived spec (project.generated.yml), and the app shows a note in
its Remotes & devices settings section explaining that it was left out and how to add it back
(rebuild with the SDK present).
| Variable | Default | Effect |
|---|---|---|
FABOLUS_GARMIN |
auto-detected | Unset: Garmin is included only if the Connect IQ SDK is present at the vendored path. FABOLUS_GARMIN=1 / =0 forces Garmin on/off, overriding auto-detection (=1 requires the SDK; =0 drops the ConnectIQ package + GARMIN flag). |
That's the only optional component left to gate — the watchOS companion app and its on-device
eating detector were removed from main entirely, so there's no target or SDK left for a flag to
control. A handful of other flags (FABOLUS_ICLOUD, FABOLUS_TANDEM_LOCAL, and similar) exist for
paid-account entitlements and co-development — read the comments at the top of
generate-project.sh if you need one of those.
Plain xcodegen generate includes everything
Running xcodegen generate directly (instead of the script) still works, but always builds the
full project — Garmin linked — so it requires the Connect IQ SDK to be present. Use the script
if you want the optional-component handling.
Garmin watch app (Connect IQ)¶
The Garmin app is in the separate faBolusGarmin repo:
cd ~/faBolus/faBolusGarmin
SDK=~/Library/Application\ Support/Garmin/ConnectIQ/Sdks/<sdk-version>
"$SDK/bin/monkeyc" -f monkey.jungle -o bin/faBolus.iq -y <developer_key.der> -e -r -w
Sideload in the Connect IQ simulator, or upload bin/faBolus.iq to the Connect IQ store as a
beta and install from Garmin Connect Mobile. See that repo's README for the venu3s input model and
complication notes.
Docs site¶
mkdocs-material, auto-deployed to GitHub Pages by .github/workflows/docs.yml on pushes that
touch docs/. Local preview: pip install mkdocs-material && mkdocs serve.