Skip to content

Switch from LibreCRKit to RoundWhiteDiscKit for Trio Branch - #1

Open
kingst wants to merge 6 commits into
loopandlearn:triofrom
kingst:trio-roundwhitedisckit
Open

kingst wants to merge 6 commits into
loopandlearn:triofrom
kingst:trio-roundwhitedisckit

Conversation

@kingst

@kingst kingst commented Oct 3, 2026 •

Copy link
Copy Markdown

This PR has four different changes bundled into it:

  1. @ps2 changes to move from LibreCRKit to RoundWhiteDiscKit
  2. @kingst changes to make it compatible with Trio's older version of LoopKit
  3. @jwoglom changes to add dependencies to enable Release builds
  4. Bump the version of RoundWhiteDiscKit to use @jwoglom latest PR that landed there

ps2 and others added 6 commits October 2, 2026 02:09
RoundWhiteDiscKit replaces LibreCRKit. It ships without its lookup tables:
they come from a blob on Arweave, and the package pins the blob's digest.

- LibreLoopRuntimeTables downloads the blob once (arweave.net, falling back
  to turbo-gateway.com), saves it in Application Support, and installs it.
- Pairing and reconnect install it before anything else. Pairing does so
  before NFC, so a failed download can't leave an activated sensor that
  can't be authorized.
- Onboarding starts with a download step when the tables aren't installed.
  Existing users get them on their first reconnect after updating.
- Drop the vendored phone_cert_162b.bin; the cert now comes from the tables.
- Embed RoundWhiteDiscKit's localization bundle, as was done for LibreCRKit.
Release builds failed to link LibreLoopUI with an undefined
RoundWhiteDiscKit.runtimeTablesInstalled getter. With -O and
whole-module builds, Swift's default cross-module optimization
serializes LibreLoopRuntimeTables.isInstalled into LibreLoop's module,
and LibreLoopUICoordinator inlines it -- so LibreLoopUI calls into
RoundWhiteDiscKit directly, but only LibreLoop linked the package.

Add the package product to LibreLoopUI too. Xcode already builds it as
a shared PackageProduct framework, so this links the same single copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit e28c6e0)
Resolve conflicts from the overlapping LoopKit API-surface adaptation
that landed on both branches. Took trio's side for:

- HKUnit.swift: NSLocalizedString-wrapped unit strings
- LibreLoopCGMManager.swift: status comment wording and `_ = isInoperable`
- LibreLoopSampleDetailView.swift / LibreLoopSettingsView.swift: import ordering
- LibreLoopUI/Localizable.xcstrings: kept both new keys
  ("FreeStyle Libre 3 / 3+" from trio, "Generation" from this branch)
@kingst

kingst commented Oct 3, 2026

Copy link
Copy Markdown
Author

Note: I saw the RoundWhiteDiscKit changes land, so I updated to the latest sha for that repo here

@dnzxy dnzxy changed the title Trio roundwhitedisckit Switch from LibreCRKit to RoundWhiteDiscKit for Trio Branch Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants