Repository navigation
Pair with libre3sim in the iOS Simulator - #30
Merged
Merged
Conversation
The Simulator has no NFC and no Libre 3. In Simulator builds only, pairing talks to libre3sim: its HTTP API stands in for the sensor's NFC tag and supplies the app credential and the key that signs its sensors' certificates, and Bluetooth reaches it through ImpossiBLE. Device builds are unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The iOS Simulator has no NFC and no Libre 3, so LibreLoop couldn't be paired there. This lets it pair with LoopKit/libre3sim, a Libre 3 emulator that reaches the app's Bluetooth through ImpossiBLE, the same way g7sim does for the G7.
In Simulator builds only (
#if targetEnvironment(simulator)), libre3sim's HTTP API:LibreLoopSimulatedNFCReader, which followsLibre3NFCActivationReader's scan);PairingFlowas a trusted patch-signing key.libre3sim has its own signing key and app credential; no Abbott key material is involved. Set
LIBRE3SIM_URLif its API isn't on127.0.0.1:8080. Device builds are unchanged.Tested with next-dev Loop in the Simulator: pairing a fresh sensor through NFC activation, re-pairing a worn sensor through switch receiver, readings, a cached reconnect after a dropped link, and reconnect plus backfill after a 3-minute outage. I didn't run a device build; the
#elsebranches are the existing code.