App programmed in Swift/SwiftUI for using Libre 1/2 blood glucose sensors.

Overview

Glucose Direct App

Warning, This project is highly experimental. Please use this app with caution and extreme care. Do not mindlessly make decisions based on software. Do not use this software if you are unsure.

App programmed in Swift/SwiftUI for using Libre 1/2 blood glucose sensors. I try to keep the code as readable and understandable as possible so that as many people as possible can understand how this part of diabetes management works.

Current features

  • Libre 2 EU support (without transmitter)
  • Libre 1 support with transmitter (supported transmitter bubble)
  • Libre 1, manual scans without transmitter
  • Add manual bgm values
  • Manage bgm/cgm values
  • Units mg/dL or mmol/L
  • Upload glucose values to Nightscout
  • Upload sensor start to Nightscout
  • FreeAPS X support (with Shared App Groups)
  • Calendar export (to support Apple Watch)
  • Glucose read aloud
  • Glucose badge
  • Glucose chart
  • Glucose trend arrow
  • Glucose change per minute
  • Factory calibration
  • Custom calibration
  • Lifetime details
  • Transmitter details
  • Sensor details
  • Glucose alert for lows and highs
  • Connection lost alert
  • Missed readings alert
  • Sensor expiring alert
  • Snooze for glucose alerts

Available languages

  • Swedish
  • Spanish
  • Russian
  • Portuguese
  • Italian
  • German
  • Finnish
  • English
  • Chinese (simplified and traditional)

Requirements

  • Apple iPhone with iOS 15

Quick test?

You can quickly get an idea of Libre Direct: TestFlight

Frequently Asked Questions

Read the FAQ ☺️

Feedback?

I am very happy to receive feedback - suggestions for improvement or reports of bugs encountered.

Support?

Many thanks goes to

  • Richard for the design of the app icon
  • Jon-b-m and bubblan for your translation into Swedish
  • birdfly for your translation into Chinese (simplified and traditional)
  • Timmy_otoole and albertodeviaje2 for your translation into Spanish
  • goldshotter and ferdytao for your translation into Italian
  • Fcourela for your translation into Portuguese
  • keyzersemen, georgin303 and anton-tony_v for your translation into Russian
  • mrfrostt and Mrzurgon for your translation into Finnish
  • Thanks to all Paypal supporters
  • All who contribute to the app with their ideas

Todo

  • Cache Nightscout uploads without an Internet connection and run them later
  • Connect to Apple Health
  • Transmitter battery notifications
  • Upload sensor end to nightscout
  • Other transmitters
  • Other diabetes sources to upload to (like tidepool, ...)

Screenshots

Screenshot Screenshot Screenshot Screenshot

I use sounds from the following sources (incl. licenses):

Source: https://freesound.org/people/SpliceSound/sounds/369848 Author: SpliceSound License: CC0 1.0 Universal, http://creativecommons.org/publicdomain/zero/1.0/

Source: https://freesound.org/people/JavierZumer/sounds/257227 Author: JavierZumer License: Attribution 3.0 Unported, http://creativecommons.org/licenses/by/3.0/

Source: https://freesound.org/people/JavierZumer/sounds/257235 Author: JavierZumer License: Attribution 3.0 Unported, http://creativecommons.org/licenses/by/3.0/

Source: https://freesound.org/people/LorenzoTheGreat/sounds/417791 Author: LorenzoTheGreat License: Attribution 3.0 Unported, http://creativecommons.org/licenses/by/3.0/

Source: https://freesound.org/people/LittleRobotSoundFactory/sounds/270329/ Author: LittleRobotSoundFactory License: Attribution 3.0 Unported, http://creativecommons.org/licenses/by/3.0/

Source: https://freesound.org/people/LittleRobotSoundFactory/sounds/270327/ Author: LittleRobotSoundFactory License: Attribution 3.0 Unported, http://creativecommons.org/licenses/by/3.0/

Source: https://freesound.org/people/LittleRobotSoundFactory/sounds/270323/ Author: LittleRobotSoundFactory License: Attribution 3.0 Unported, http://creativecommons.org/licenses/by/3.0/

Source: https://freesound.org/people/LittleRobotSoundFactory/sounds/270319/ Author: LittleRobotSoundFactory License: Attribution 3.0 Unported, http://creativecommons.org/licenses/by/3.0/

Source: https://freesound.org/people/LittleRobotSoundFactory/sounds/270330/ Author: LittleRobotSoundFactory License: Attribution 3.0 Unported, http://creativecommons.org/licenses/by/3.0/

Source: https://freesound.org/people/LittleRobotSoundFactory/sounds/270305/ Author: LittleRobotSoundFactory License: Attribution 3.0 Unported, http://creativecommons.org/licenses/by/3.0/

Source: https://freesound.org/people/LittleRobotSoundFactory/sounds/270304/ Author: LittleRobotSoundFactory License: Attribution 3.0 Unported, http://creativecommons.org/licenses/by/3.0/

Source: https://freesound.org/people/ProjectsU012/sounds/341629/ Author: ProjectsU012 License: Attribution 3.0 Unported, http://creativecommons.org/licenses/by/3.0/

Source: https://freesound.org/people/ProjectsU012/sounds/334261/ Author: ProjectsU012 License: Attribution 3.0 Unported, http://creativecommons.org/licenses/by/3.0/

Source: https://freesound.org/people/ProjectsU012/sounds/360964/ Author: ProjectsU012 License: Attribution 3.0 Unported, http://creativecommons.org/licenses/by/3.0/

Source: https://freesound.org/people/ProjectsU012/sounds/333785/ Author: ProjectsU012 License: Attribution 3.0 Unported, http://creativecommons.org/licenses/by/3.0/

Source: https://freesound.org/people/TannerSound/sounds/478262/ Author: TannerSound License: Attribution 3.0 Unported, http://creativecommons.org/licenses/by/3.0/

Source: https://freesound.org/people/andersmmg/sounds/511491/ Author: andersmmg License: Attribution 3.0 Unported, http://creativecommons.org/licenses/by/3.0/

Source: https://freesound.org/people/shinephoenixstormcrow/sounds/337050/ Author: shinephoenixstormcrow License: Attribution 3.0 Unported, http://creativecommons.org/licenses/by/3.0/

Source: https://freesound.org/people/soneproject/sounds/346425/ Author: soneproject License: Attribution 3.0 Unported, http://creativecommons.org/licenses/by/3.0/

Source: https://freesound.org/people/ying16/sounds/353069/ Author: ying16 License: Attribution 3.0 Unported, http://creativecommons.org/licenses/by/3.0/

Source: https://freesound.org/people/queenoyster/sounds/582986/ Author: queenoyster License: CC0 1.0 Universal, http://creativecommons.org/publicdomain/zero/1.0/

Source: https://freesound.org/people/walkingdistance/sounds/185197/ Author: walkingdistance License: Attribution 3.0 Unported, http://creativecommons.org/licenses/by/3.0/

Source: https://freesound.org/people/melokacool/sounds/613653 Author: melokacool License: CC0 1.0 Universal, http://creativecommons.org/publicdomain/zero/1.0/

Comments
  • readRaw() and writeRaw() not supported by the Libre 2

    readRaw() and writeRaw() not supported by the Libre 2

    The custom NFC commands A3 and A4 to read from any 16-bit address and to gain write access to the FRAM are not supported by the Libre 2.

    The overhead introduced by the nested handlers at https://github.com/creepymonster/LibreDirectApp/blob/d1a94370ed8465234d967729fea277df121cc665/LibreDirectLibrary/Modules/Libre2/Libre2PairingService.swift#L95-L97 can be therefore avoided.

    opened by gui-dos 9
  • Suggestion integration Calendar

    Suggestion integration Calendar

    The integration with Calendar seems magic to me, it is wonderful, even in CarPlay it gives me the current values, but I have a suggestion, the highest refresh time is 15 minutes and in Calendar the values for 10 minutes appear so there are 5 minutes in which there is no data, if the times coincided there would be no times in Calendar without values. Could it be done? Thank you

    opened by egpall 7
  • A test “companion” mode for Libre 2 / LibreLink.

    A test “companion” mode for Libre 2 / LibreLink.

    If you just activate the notifications on the Libre 2 read characteristic without sending the unlock payload and then launch LibreLink, you can receive the data regularly while keeping both apps running side-by-side, even after closing LibreLink.

    https://github.com/creepymonster/GlucoseDirect/blob/cdb8ee8bbabde9887dd9fa06eec3b86c78d65021/App/Modules/SensorConnector/Libre2Connection/Libre2Connection.swift#L127

    This is technically possible on iOS with any app since in CoreBluetooth the connections are reference-counted and a device has no clue that the same characteristics’ values will be notified to all the multiple apps that subscribed to them.

    It could be a way to test the app without activating BLE on your own since LibreLink can keep on reconnecting successfully to the sensor and turning off the red exclamation mark regarding the alarms unavailability in a couple of minutes.

    I implemented it very easily in the “Test” mode of https://github.com/gui-dos/DiaBLE so I think that porting it will be quite doaBLE :-)

    opened by gui-dos 7
  • Insulin Delivery

    Insulin Delivery

    This PR adds Insulin Delivery to the Application and also uploads it to Apple Health and Nightscout.

    I also updated the Health integration to delete glucose and insulin records from Apple Health when they originated from Glucose Direct and they are deleted within Glucose Direct.

    I chose to use the insulin options that NightScout uses (Meal Bolus, Correction Bolus, Snack Bolus) and then I downgrade them for use in Apple Health which only supports Bolus and Basal.

    Some of these requests are in #214

    enhancement 
    opened by bassrock 5
  • Schieber

    Schieber "Bewegung"

    Moin,

    danke für die App, eine schöne Alternative zu xDrip.

    In den Einstellungen habe ich ein interessantes Verhalten festgestellt.

    Wenn man unter "Glukose-Einstellungen" einen der beiden Slider bewegt, verschiebt sich der andere mit, aber der Wert bleibt gleich.

    Gruß mg

    opened by quotengrote 5
  • Kennzeichensymbol verschwindet

    Kennzeichensymbol verschwindet

    Hallo,

    das kennzeichensymbol wird nicht zuverlässig angezeigt. Mal ist es da, mal nicht.

    aktuelle GlucoseDirect version

    Schöne Grüsse Friedhelm Walldorf

    opened by FriedelXT 3
  • Calibration

    Calibration

    The first thing to say is that I think the application is wonderful. I wanted to make a query and yes, it is necessary to record some calibration and if so, it would be convenient, several measurements at different times of the day with test strips and write them down or what would be the best method. Mucha I wanted to make a query and yes, it is necessary to register some calibration and if so, it would be convenient, several measurements at different times of the day with test strips and write them down or what would be the best method. Thank you very much for everything. Thank you for everything.

    opened by egpall 3
  • Compilation Error

    Compilation Error

    Xcode v13.4.1 Main branch

    I try to compile the code with my Iphone XR IOS 15.5. I fail to compile with lot of errors, in particular :

    Glucose.swift:15:30: Protocol 'Glucose' can only be used as a generic constraint because it has Self or associated type requirements TransmitterWidget.swift:74:28: Variable binding in a condition requires an initializer GlucoseWidget.swift:144:59: Type 'WidgetFamily' has no member 'accessoryRectangular'

    I just updated the GlucoseDirect.xconfig for the development team.

    image

    Any idea ?

    opened by avouspierre 3
  • Libre Link Upload&Download integration

    Libre Link Upload&Download integration

    For relatives and doctors that are not as technically capable and willing to use opensource software, it would be great if you could interface directly with the Abbott database. Being a Libre Linkup partner to watch over your relatives glucose levels or send your own measurements to your linkup partners like wife, husband, boyfriend or doctor would be great.

    opened by yoshimo 3
  • Libre algorithm

    Libre algorithm

    It's a great app and very useful, but I have some suggestions to make if I'm allowed. First, and most importantly is the libre algorithm which in my opinion is reading to low (with about 6-7%). It would be great if you could raise the readings with about 6% at least.
    Secondly but not so important are the notifications which should be more basic. Besides that congratulations for your work!

    opened by dugamarian 3
  • adding manual BG while waiting for sensor

    adding manual BG while waiting for sensor

    I was waiting for a virtual sensor connection and added a manual Glucose Reading in List. This initiated the graph on Overview with the sensor connection state output below Simulator Screen Shot - iPhone 13 mini - 2021-12-09 at 09 49 13

    opened by mountrcg 3
  • WIP - Watch Complications

    WIP - Watch Complications

    Work in progress PR to add a base watch app and Watch complications using WidgetKit in watchOS 9.0 with the existing widget code.

    Open to @creepymonster's feedback before I go further!

    Screenshot 2022-12-31 at 11 12 42 PM Screenshot 2022-12-31 at 11 12 48 PM
    opened by bassrock 2
  • [Suggestion] Higher time period over which delta is computed

    [Suggestion] Higher time period over which delta is computed

    Hi

    Could it be possible to compute the delta over a higher time period such as 5 minutes. With the current 1 minute I feel like there’s missing resolution as it is always +- 0.2 mmol (at least for me) and increasing the time period would give a higher resolution and at least for me a bit more relevant information as the erratic ups and downs don’t always mean anything.

    Love the app the live activity is great!

    Thank you for your time.

    opened by niekocaster 0
  • Give warning when you need to accept ToS from Libre Link Up

    Give warning when you need to accept ToS from Libre Link Up

    I've been debugging for a while today, and my login didn't work because I needed to accept the ToS of Libre Link Up to get data form my Libre3. It would be awesome if we could get a warning when it's time to re-accept the terms.

    The response from the server looks like this when this is the case:

    {"status":4,"data":{"step":{"type":"pp","componentName":"AcceptDocument","props":{"reaccept":true,"titleKey":"Common.privacyPolicy","type":"pp"}},"user":{"accountType":"pat","country":"SE","uiLanguage":"en-GB"},"authTicket":{"token":"[redacted]","expires":1671406008,"duration":3600000}}}↵
    
    
    opened by AndreasStokholm 0
  • Support Dexcom G7

    Support Dexcom G7

    Hey, I love the live activity feature for this app. Especially with the dynamic island, this is wonderful. Sadly since in my area, the Libre 3 stock is limited I need to switch to Dexcom G7. Is there a way to add support for this model?

    opened by iMonZ 0
  • No Data - State Disconnected

    No Data - State Disconnected

    Hello,

    First of all thanks for this wonderful app!

    Unfortunately I can't seem to get past the No Data phase. Scanned the sensor successfully and entered the LibreLinkUp credentials, too. I assume they're correct because I see a specific error when I purposefully enter wrong credentials.

    Is there a reason why the warmup phase should take long? It's been almost 1h since I first scanned the sensor. As a comparison, I logged into LibreLinkUp right before this for the first time and data showed up immediately there.

    This is what the app looks like: IMG_9276

    • Log file with the email and name removed: [AllLogs.log]

    Please do not share logs here on Github - logs may contain sensitive information. Rather send the logfile via email to the address in the app.

    • iPhone 14 Pro
    • iOS Version 16.1.2

    Let me know if there's anything else I can provide or if you have any ideas. Thanks!

    opened by skidding 2
  • Adding vibrations to Apple Watch Calendar events

    Adding vibrations to Apple Watch Calendar events

    Technically it is possible to associate an alarm to a calendar EKEvent with just a couple of lines of code:

        let alarm = EKAlarm(relativeOffset: 1)
        event.addAlarm(alarm)
    

    This way you can receive HI / LOW alarms also on your Mac during stressful coding :-)

    opened by gui-dos 2
Releases(1.0.0)
  • 1.0.0(Jul 25, 2022)

    • iOS 16: Chart has been completely redesigned and offers many new features/improvements.
    • iOS 16: New widget for lock screen (glucose, sensor age and transmitter battery).
    • Battery consumption optimized (reduces UI updates in background)
    • Data storage completely reworked
    • List has been extended with statistics (more detailed analysis is available with the Cockpit app)
    • Alarm for disconnections has been reworked
    • Added the possibility to deactivate the screen lock
    • Display of sensor age/transmitter battery has been revised
    • More UI improvements
    Source code(tar.gz)
    Source code(zip)
  • 0.6.13(Dec 9, 2021)

    Added:

    • Calendar export added (for display on Apple Watch)

    Fixed:

    • Fixed Bubble swapped hardware/firmware version
    • Fixed rare error when Libre 2 doesnt send any data (required new pairing)
    • Fixed wrong change per minute for values < 40
    Source code(tar.gz)
    Source code(zip)
Owner
Reimar Metzen
Reimar Metzen
Displays your HomeKit temperature sensors in your menu bar

Temperature Glance Displays your HomeKit temperature sensors in your menu bar Screenshot Note This is a very simple app that I made for myself but dec

Fernando Bunn 15 Nov 14, 2022
Yummies is my first attempt at building a native iOS app using Swift and SwiftUI

Yummies is my first attempt at building a native iOS app using Swift and SwiftUI. A recipe browser where you can pin your favorite ones. Powered by Edamam Recipe Search API.

Yavor Radulov 2 Aug 27, 2022
ProximitySensor - Property wrappers for using the Proximity Sensor from the SwiftUI app

ProximitySensor Property wrappers for using the Proximity Sensor from the SwiftU

null 2 Aug 20, 2022
NetworkIcom - Project using Swift and SwiftUI to access Icom 7610 via Ethernet

Background This repository is an upload of a local Git repository from an Apple

Mark Erbaugh 9 Sep 25, 2022
Google-Blogger-iOS-App - Using Google Blogger API to build an iOS app like Medium

Google Blogger iOS App Using Google Blogger API to build an iOS app like Medium!

Ricky Chuang 9 Dec 13, 2022
BioViewer - Protein (.pdb, .cif and .fasta) viewer for iPhone, iPad and Mac, using SwiftUI + SceneKit

BioViewer - Protein (.pdb, .cif and .fasta) viewer for iPhone, iPad and Mac, using SwiftUI + SceneKit

Raúl Montón 16 Dec 21, 2022
Easy-to-use segues in SwiftUI, allowing for presenting views using common UIKIt Segue types - push, modal and popover

Easy-to-use segues in SwiftUI, allowing for presenting views using common UIKIt Segue types - push, modal and popover

Gordan Glavaš 5 Apr 16, 2022
This was built during my bootcamp using SwiftUI, WebKit and an API from Hacker News

HackerNewsReader This was built during my bootcamp using SwiftUI, WebKit and an API from Hacker News. This was programmed from scratch with SwiftUI. I

Wilson Woodyard 2 Feb 25, 2022
A sample app that implements MVVM architecture using Swift, ViewModel, Alamofire

MVVM Architecture Android: Template This repository contains a sample app that implements MVVM architecture using Swift, ViewModel, Alamofire, and etc

null 0 Oct 19, 2021
Swift sample app for running privileged operations on macOS using a helper tool

SwiftAuthorizationSample demonstrates how to run privileged operations on macOS using a helper tool managed by launchd. This sample was created with t

null 31 Dec 20, 2022
Kushal Shingote 1 Feb 2, 2022
Custom MacBook login screen and pam modules using multipeer connectivity and usb hardware checks with iOS app for sign in.

Custom MacBook login screen and pam modules using multipeer connectivity and usb hardware checks with iOS app for sign in.

null 2 Aug 17, 2022
Create an app using VIPER architecture

How not to get confused with VIPER Implementation This is a demo app to share in swift study group using VIPER Architechture When using VIPER Architec

null 1 Dec 4, 2021
a playground app using `MultipeerConnectivity` to transfor data wirelessly between iOS / iPadOS

README An example app using MultipeerConnectivity to transfor data wirelessly between iOS / iPadOS. Both using Data and Stream to transfer data are su

null 3 Aug 6, 2022
An iOS App which shows live AQI (Air quality index) data for different cities using Web-socket

AQI - Assignment This is an iOS App which shows live AQI (Air quality index) dat

Pratik Prajapati 3 Jul 21, 2022
Quiz app using MVC.

Quizzler Our Goal The goal of this tutorial is to take you one step further in your journey of becoming an app developer. We are going to introduce yo

null 0 Jan 10, 2022
RMSUI - A Simple Swift MVVM architectured Rick & Morty UI app in order to practice SwiftUI & GraphQL

RMSUI A Simple Swift MVVM architectured "Rick & Morty UI" app ?? in order to pra

null 0 Jan 24, 2022
React Native library that implements PayPal Checkout flow using purely native code (swift).

react-native-paypal-swift React Native library that implements PayPal Checkout flow using purely native code (swift). Installation npm install react-n

Tibb 6 Nov 28, 2022
A web API client in Swift built using Async/Await

Web API Client A modern web API client in Swift built using Async/Await and Actors. let client = APIClient(host: "api.github.com") // Using the clien

Alexander Grebenyuk 741 Dec 30, 2022