How loopkit/loop works
Loop is an experimental iOS app template for automated insulin delivery, built on LoopKit. Its central runtime manager updates glucose and dosing state, may enact an automatic dose, and reports completion; the source index also shows its store, meal-detection, analytics, and live-activity dependencies. The app includes status and alert surfaces, pump/CGM plugin support, and Watch and widget experiences. Edges are limited to the supplied excerpts, source-index references, or README; unsampled details and integrations are not inferred as verified calls.
Main entry points: LoopDataManager.swift Loop runtime · StatusTableViewController.swift Status screen · LoopSettings.swift Loop settings · PersistenceController.swift Persistence
Components 22
Dosing runtime
- Loop runtime
Loop/Managers/LoopDataManager.swift - Loop settings
LoopCore/LoopSettings.swift - Persistence
LoopCore/PersistenceController.swift - Carb store
Loop/Managers/Store Protocols/CarbStoreProtocol.swift - Glucose store
Loop/Managers/Store Protocols/GlucoseStoreProtocol.swift - Dose store
Loop/Managers/Store Protocols/DoseStoreProtocol.swift - Decision store
Loop/Managers/Store Protocols/DosingDecisionStoreProtocol.swift - Meal detection
Loop/Managers/Missed Meal Detection/MealDetectionManager.swift - Analytics
Loop/Managers/AnalyticsServicesManager.swift
Devices and alerts
- Plugin manager
Loop/Plugins/PluginManager.swift - Pump manager
Common/Models/PumpManager.swift - Alert manager
Loop/Managers/Alerts/AlertManager.swift - Alert store
Loop/Managers/Alerts/AlertStore.swift
App surfaces
- Status screen
Loop/View Controllers/StatusTableViewController.swift - Status extension
Loop Status Extension/StatusViewController.swift - Insulin delivery UI
Loop/View Controllers/InsulinDeliveryTableViewController.swift - Lessons
Learn/View Controllers/LessonResultsViewController.swift
Companion apps
- Watch app
WatchApp Extension/Managers/LoopDataManager.swift - Watch entry
WatchApp Extension/Views/Carb Entry & Bolus/CarbAndBolusFlow.swift - Widgets
Loop Widget Extension/LoopWidgets.swift - Live activity
Loop/Managers/Live Activity/LiveActivityManager.swift
Other components
- Person
Connections 18
- Loop runtime → Carb store: uses store
Loop/Managers/LoopDataManager.swift - Loop runtime → Glucose store: uses store
Loop/Managers/LoopDataManager.swift - Loop runtime → Dose store: uses store
Loop/Managers/LoopDataManager.swift - Loop runtime → Decision store: stores decisions
Loop/Managers/LoopDataManager.swift - Loop runtime → Meal detection: uses detection
Loop/Managers/LoopDataManager.swift - Loop runtime → Analytics: reports outcomes
Loop/Managers/LoopDataManager.swift - Loop runtime → Live activity: updates proxy
Loop/Managers/LoopDataManager.swift - Plugin manager → Pump manager: discovers types
Loop/Plugins/PluginManager.swift - Alert manager → Alert store: queries entries
Loop/Managers/Alerts/AlertManager.swift - Status screen → Status extension: renders status
Loop/View Controllers/StatusTableViewController.swift - Person → Status screen: views status
README.md - Person → Insulin delivery UI: enters doses
README.md - Person → Watch entry: enters on watch
README.md - Person → Lessons: takes lessons
- Persistence → Loop runtime: provides persistence
Loop/Managers/LoopDataManager.swift - Loop settings → Loop runtime: configures dosing
Loop/Managers/LoopDataManager.swift - Widgets → Loop runtime: reads status
Loop/Managers/LoopDataManager.swift - Watch app → Loop runtime: syncs context