How johandegraeve/xdripswift works
xDrip4iOS is an iOS CGM monitoring app with Master mode for direct sensor connections and Follower mode for remote glucose services. The principal workflow acquires or downloads readings, stores them locally, then presents them in the app and system surfaces; processing, alerts, analytics, and sharing extend that workflow. The README documents the supported sources and product capabilities; sampled excerpts provide implementation detail for only some managers, so uncertain internal wiring is omitted. Optional destinations are shown separately from the main reading path.
Main entry points: CoreDataManager.swift Core Data · XdripApp.swift iOS app · BluetoothPeripheralManager.swift Peripheral manager · NightscoutFollowManager.swift Nightscout follower
Components 26
Data acquisition
- Peripheral manager
xDrip/Managers/BluetoothPeripheral/BluetoothPeripheralManager.swift - CGM transmitters
xDrip/BluetoothTransmitter/CGM - Nightscout follower
xDrip/Managers/Nightscout/NightscoutFollowManager.swift - CareLink follower
xDrip/Managers/CareLink/CareLinkFollowManager.swift - LibreLinkUp follower
xDrip/Managers/LibreLinkUp/LibreLinkUpFollowManager.swift - Other followers
xDrip/Managers/Followers
Reading core
- Core Data
xDrip/Managers/CoreData/CoreDataManager.swift - Reading processing
xDrip/Managers/PostProcessing/BgPostProcessingManager.swift - Sensor noise
xDrip/Managers/SensorNoise/SensorNoiseManager.swift
App experience
- iOS app
xDrip/Application Delegate/XdripApp.swift - Glucose chart
xDrip/Managers/Charts/GlucoseChartStateManager.swift - Alerts
xDrip/Managers/Alerts/AlertManager.swift - Statistics
xDrip/Managers/Statistics/StatisticsManager.swift - Therapy metrics
xDrip/Managers/Therapy/TherapyMetricsManager.swift
Sharing and health
- Nightscout sync
xDrip/Managers/Nightscout/NightscoutSyncManager.swift - Dexcom Share upload
xDrip/Managers/DexcomShare/DexcomShareUploadManager.swift - Apple Health
xDrip/Managers/HealthKit/HealthKitManager.swift - Loop sharing
xDrip/Managers/Loop/LoopManager.swift
System surfaces
- Watch app
xDrip Watch App/Views/MainView/MainView.swift - Watch complications
xDrip Watch Complication/XDripWatchComplication.swift - Widgets and Live Activities
xDrip Widget/XDripWidget.swift - Siri and Shortcuts
xDrip/AppShortcuts.swift - M5 companion displays
xDrip/BluetoothTransmitter/M5Stack/M5StackBluetoothTransmitter.swift
Other components
- User
- CGM device
- Follower services
Connections 35
- User → iOS app: uses
- CGM device → Peripheral manager: Bluetooth data
- Peripheral manager → CGM transmitters: manages
- CGM transmitters → Peripheral manager: delegate callbacks
- Peripheral manager → Core Data: persists readings
- Follower services → Nightscout follower: provides data
- Follower services → CareLink follower: provides data
- Follower services → LibreLinkUp follower: provides data
- Follower services → Other followers: provides data
- Nightscout follower → Core Data: imports readings
- CareLink follower → Core Data: imports data
- LibreLinkUp follower → Core Data: imports readings
- Other followers → Core Data: imports readings
- iOS app → Peripheral manager: configures sources
- iOS app → Nightscout follower: selects follower
- Core Data → Reading processing: supplies readings
- Reading processing → Core Data: updates readings
- Core Data → Sensor noise: supplies samples
- Core Data → Glucose chart: loads chart data
- Core Data → Statistics: supplies history
- Core Data → Therapy metrics: supplies treatments
- Core Data → Alerts: supplies readings
- Core Data → Nightscout sync: syncs records
- Nightscout sync → Follower services: uploads and downloads
- Core Data → Dexcom Share upload: supplies readings
- Dexcom Share upload → Follower services: uploads readings
- Core Data → Apple Health: shares readings
- Core Data → Loop sharing: shares glucose
- iOS app → Glucose chart: shows readings
- iOS app → Alerts: manages alerts
- Core Data → Watch app: shares glucose data
- Core Data → Watch complications: provides complication data
- Core Data → Widgets and Live Activities: provides widget data
- Core Data → Siri and Shortcuts: provides latest reading
- Core Data → M5 companion displays: supplies display data