Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
c84a0a5
[COASTAL-1291] plugin identifier is no longer class property (#29)
nhamming Sep 25, 2023
fb1cb87
[COASTAL-1291] plugin identifier is no longer class property (#29)
nhamming Sep 25, 2023
6985f73
Merge remote-tracking branch 'origin/dev' into ps2/LOOP-4735/cgm-even…
ps2 Sep 27, 2023
dd8879c
Merge remote-tracking branch 'origin/dev' into ps2/LOOP-4735/cgm-even…
ps2 Sep 27, 2023
148f9a5
Merge pull request #30 from tidepool-org/ps2/LOOP-4735/cgm-event-store
ps2 Sep 27, 2023
72aadf3
Merge pull request #30 from tidepool-org/ps2/LOOP-4735/cgm-event-store
ps2 Sep 27, 2023
490ee35
Updates for LOOP-4752
ps2 Dec 12, 2023
c0b28c5
Updates for LOOP-4752
ps2 Dec 12, 2023
3941575
[WIP][LOOP-4793] Beginning XCUI Tests
Camji55 Feb 14, 2024
8da22f1
[WIP][LOOP-4793] Beginning XCUI Tests
Camji55 Feb 14, 2024
effee9e
Types moved to LoopAlgorithm
ps2 Mar 1, 2024
52110dc
Types moved to LoopAlgorithm
ps2 Mar 1, 2024
abc1b26
Merge pull request #31 from tidepool-org/ps2/LOOP-4781/algorithm-package
ps2 Mar 5, 2024
67b641b
Merge pull request #31 from tidepool-org/ps2/LOOP-4781/algorithm-package
ps2 Mar 5, 2024
93b6067
Merge branch 'dev' into cameron/LOOP-4793
Camji55 Apr 15, 2024
c5ba8da
Merge branch 'dev' into cameron/LOOP-4793
Camji55 Apr 15, 2024
739cacb
Updates for OnboardingUI protocol changes
ps2 Jul 8, 2024
b32b94c
Updates for OnboardingUI protocol changes
ps2 Jul 8, 2024
c2b0979
Merge pull request #32 from tidepool-org/ps2/LOOP-4764/display-insuli…
ps2 Jul 8, 2024
a2fe8b2
Merge pull request #32 from tidepool-org/ps2/LOOP-4764/display-insuli…
ps2 Jul 8, 2024
a967fe0
Merge branch 'dev' into cameron/LOOP-4793
Camji55 Jul 30, 2024
5186813
Merge branch 'dev' into cameron/LOOP-4793
Camji55 Jul 30, 2024
aca112f
[LOOP-4793] Beginning XCUI Tests
Camji55 Sep 11, 2024
4f97a2a
[LOOP-4793] Beginning XCUI Tests
Camji55 Sep 11, 2024
f96a297
Onboard nightscout service directly (#34)
ps2 Oct 25, 2024
e1db2cf
Onboard nightscout service directly (#34)
ps2 Oct 25, 2024
79411d7
[PAL-818] service allowDebugFeatures (#35)
nhamming Oct 30, 2024
16e2946
[PAL-818] service allowDebugFeatures (#35)
nhamming Oct 30, 2024
e84a71d
[LOOP-5153] Remove HealthKit dependency from LoopAlgorithm
Camji55 Nov 21, 2024
40d4c50
[LOOP-5153] Remove HealthKit dependency from LoopAlgorithm
Camji55 Nov 21, 2024
5596b8a
[LOOP-5153] Remove HealthKit dependency from LoopAlgorithm
Camji55 Nov 22, 2024
2b8e805
[LOOP-5153] Remove HealthKit dependency from LoopAlgorithm
Camji55 Nov 22, 2024
3003089
[LOOP-5153] Remove HealthKit dependency from LoopAlgorithm
Camji55 Dec 4, 2024
3f4e76d
[LOOP-5153] Remove HealthKit dependency from LoopAlgorithm
Camji55 Dec 4, 2024
7b8703a
Bump to iOS 17
Camji55 Dec 6, 2024
ef877a6
Bump to iOS 17
Camji55 Dec 6, 2024
2cd2510
Bump to iOS 17
Camji55 Dec 9, 2024
6b072d1
Bump to iOS 17
Camji55 Dec 9, 2024
9fb8108
Remove adult/child insulin model selection (#38)
ps2 May 29, 2025
d2d8711
Remove adult/child insulin model selection (#38)
ps2 May 29, 2025
f824b84
[LOOP-5405] Remove Legacy Workout Preset
Camji55 Aug 21, 2025
b42e2d8
[LOOP-5405] Remove Legacy Workout Preset
Camji55 Aug 21, 2025
36dc0cd
[LOOP-5405] Remove Legacy Workout Preset
Camji55 Aug 21, 2025
452feba
[LOOP-5405] Remove Legacy Workout Preset
Camji55 Aug 21, 2025
817ac27
[LOOP-5405] Activity Presets Core
Camji55 Aug 21, 2025
adf98bd
[LOOP-5405] Activity Presets Core
Camji55 Aug 21, 2025
bb0d8e3
[LOOP-5405] Activity Presets Core
Camji55 Aug 22, 2025
42ab13d
[LOOP-5405] Activity Presets Core
Camji55 Aug 22, 2025
88b6a23
[LOOP-5707] Use New Presets UI for DIY Loop Onboarding
Camji55 Jan 23, 2026
36a0a55
[LOOP-5707] Use New Presets UI for DIY Loop Onboarding
Camji55 Jan 23, 2026
450c45b
[LOOP-5707] Use New Presets UI for DIY Loop Onboarding
Camji55 Jan 26, 2026
b49e3d1
[LOOP-5707] Use New Presets UI for DIY Loop Onboarding
Camji55 Jan 26, 2026
1eb8a82
Add missing loopDataManager.dosingStrategySelectionEnabled to Onboard…
Camji55 Mar 4, 2026
2973075
Add missing loopDataManager.dosingStrategySelectionEnabled to Onboard…
Camji55 Mar 4, 2026
53ebd63
[LOOP-5707] Add missing loopDataManager.dosingStrategySelectionEnable…
Camji55 Mar 5, 2026
9178330
[LOOP-5707] Add missing loopDataManager.dosingStrategySelectionEnable…
Camji55 Mar 5, 2026
eece785
Merge tidepool/dev into tidepool-sync/2026-03-10
loopkitdev Mar 10, 2026
c80552c
Merge remote-tracking branch 'upstream/dev' into tidepool-sync/2026-0…
loopkitdev Apr 9, 2026
da95d69
Merge tidepool/dev into tidepool-sync/2026-05-11
ps2 May 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions Extensions/HKUnit.swift

This file was deleted.

12 changes: 2 additions & 10 deletions LoopOnboarding.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@
C1C134A327DD38310097B5AD /* NightscoutServiceKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C1C134A227DD38310097B5AD /* NightscoutServiceKit.framework */; };
C1C134A427DD38310097B5AD /* NightscoutServiceKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = C1C134A227DD38310097B5AD /* NightscoutServiceKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
C1D0B62E2986C8730098D215 /* TimeZone.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1D0B62D2986C8730098D215 /* TimeZone.swift */; };
C1D936DB27D166BF00926313 /* HKUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1D936DA27D166BF00926313 /* HKUnit.swift */; };
C1D936DC27D166BF00926313 /* HKUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1D936DA27D166BF00926313 /* HKUnit.swift */; };
C1D936DD27D166BF00926313 /* HKUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1D936DA27D166BF00926313 /* HKUnit.swift */; };
C1D936E027D264D600926313 /* AppleHealthAuthView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1D936DE27D264D600926313 /* AppleHealthAuthView.swift */; };
/* End PBXBuildFile section */

Expand Down Expand Up @@ -131,7 +128,6 @@
C1C1349927DD37C80097B5AD /* NightscoutServiceKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = NightscoutServiceKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
C1C134A227DD38310097B5AD /* NightscoutServiceKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = NightscoutServiceKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
C1D0B62D2986C8730098D215 /* TimeZone.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeZone.swift; sourceTree = "<group>"; };
C1D936DA27D166BF00926313 /* HKUnit.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HKUnit.swift; sourceTree = "<group>"; };
C1D936DE27D264D600926313 /* AppleHealthAuthView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppleHealthAuthView.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -267,7 +263,6 @@
isa = PBXGroup;
children = (
A9CE7D9625BC9BF400C04F9B /* OSLog.swift */,
C1D936DA27D166BF00926313 /* HKUnit.swift */,
);
path = Extensions;
sourceTree = "<group>";
Expand Down Expand Up @@ -478,7 +473,6 @@
files = (
A9CE7D9725BC9BF400C04F9B /* OSLog.swift in Sources */,
A9CE7D7525BC9B2B00C04F9B /* LocalizedString.swift in Sources */,
C1D936DB27D166BF00926313 /* HKUnit.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -488,7 +482,6 @@
files = (
C1D0B62E2986C8730098D215 /* TimeZone.swift in Sources */,
C1D936E027D264D600926313 /* AppleHealthAuthView.swift in Sources */,
C1D936DC27D166BF00926313 /* HKUnit.swift in Sources */,
C16121EB27C457C400BCDE2A /* ImportSettingsView.swift in Sources */,
A9B3CE8125BCBD85002D9E92 /* Image.swift in Sources */,
A9B3CE8F25BCBE7D002D9E92 /* Bundle.swift in Sources */,
Expand All @@ -507,7 +500,6 @@
files = (
A9CE7FF325BCAC1800C04F9B /* LoopOnboardingPlugin.swift in Sources */,
A9CE7D9925BC9BF400C04F9B /* OSLog.swift in Sources */,
C1D936DD27D166BF00926313 /* HKUnit.swift in Sources */,
A9CE7D7725BC9B2B00C04F9B /* LocalizedString.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -636,7 +628,7 @@
GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_PARAMETER = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
LOCALIZED_STRING_MACRO_NAMES = (
NSLocalizedString,
Expand Down Expand Up @@ -742,7 +734,7 @@
GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_PARAMETER = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
LOCALIZED_STRING_MACRO_NAMES = (
NSLocalizedString,
Expand Down
8 changes: 4 additions & 4 deletions LoopOnboardingKitUI/LoopOnboardingUI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
//

import SwiftUI
import HealthKit
import LoopKit
import LoopKitUI
import LoopOnboardingKit

public final class LoopOnboardingUI: OnboardingUI {

public static func createOnboarding() -> OnboardingUI {
return Self()
}

public weak var onboardingDelegate: OnboardingDelegate?

public static let pluginIdentifier = "LoopOnboarding"
public let pluginIdentifier = "LoopOnboarding"

public var isOnboarded: Bool {
didSet {
Expand Down Expand Up @@ -53,8 +53,8 @@ public final class LoopOnboardingUI: OnboardingUI {
]
}

public func onboardingViewController(onboardingProvider: OnboardingProvider, displayGlucosePreference: DisplayGlucosePreference, colorPalette: LoopUIColorPalette) -> (UIViewController & OnboardingViewController) {
return OnboardingUICoordinator(onboarding: self, onboardingProvider: onboardingProvider, initialTherapySettings: onboardingProvider.onboardingTherapySettings, displayGlucosePreference: displayGlucosePreference, colorPalette: colorPalette)
public func onboardingViewController(onboardingProvider: OnboardingProvider, displayGlucosePreference: DisplayGlucosePreference, colorPalette: LoopUIColorPalette, dosingStrategySelectionEnabled: Bool) -> (UIViewController & OnboardingViewController) {
return OnboardingUICoordinator(onboarding: self, onboardingProvider: onboardingProvider, initialTherapySettings: onboardingProvider.onboardingTherapySettings, displayGlucosePreference: displayGlucosePreference, colorPalette: colorPalette, dosingStrategySelectionEnabled: dosingStrategySelectionEnabled)
}

private func notifyDidUpdateState() {
Expand Down
47 changes: 23 additions & 24 deletions LoopOnboardingKitUI/View Controllers/OnboardingUICoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@

import os.log
import Foundation
import HealthKit
import SwiftUI
import LoopKit
import LoopKitUI
import NightscoutServiceKit
import NightscoutServiceKitUI
import LoopSupportKitUI
import LoopAlgorithm

enum OnboardingScreen: CaseIterable {
case welcome
Expand Down Expand Up @@ -66,6 +67,7 @@ class OnboardingUICoordinator: UINavigationController, CGMManagerOnboarding, Pum

private let displayGlucosePreference: DisplayGlucosePreference
private let colorPalette: LoopUIColorPalette
private let dosingStrategySelectionEnabled: Bool

private var screenStack = [OnboardingScreen]()
private var currentScreen: OnboardingScreen { return screenStack.last! }
Expand All @@ -78,12 +80,13 @@ class OnboardingUICoordinator: UINavigationController, CGMManagerOnboarding, Pum

private static let serviceIdentifier = "NightscoutService"

init(onboarding: LoopOnboardingUI, onboardingProvider: OnboardingProvider, initialTherapySettings: TherapySettings, displayGlucosePreference: DisplayGlucosePreference, colorPalette: LoopUIColorPalette) {
init(onboarding: LoopOnboardingUI, onboardingProvider: OnboardingProvider, initialTherapySettings: TherapySettings, displayGlucosePreference: DisplayGlucosePreference, colorPalette: LoopUIColorPalette, dosingStrategySelectionEnabled: Bool) {
self.onboarding = onboarding
self.onboardingProvider = onboardingProvider
self.initialTherapySettings = initialTherapySettings
self.displayGlucosePreference = displayGlucosePreference
self.colorPalette = colorPalette
self.dosingStrategySelectionEnabled = dosingStrategySelectionEnabled
self.service = onboardingProvider.activeServices.first(where: { $0.pluginIdentifier == OnboardingUICoordinator.serviceIdentifier })

super.init(navigationBarClass: UINavigationBar.self, toolbarClass: UIToolbar.self)
Expand Down Expand Up @@ -184,7 +187,7 @@ class OnboardingUICoordinator: UINavigationController, CGMManagerOnboarding, Pum
let view = CorrectionRangeOverrideInformationView(preset: .preMeal, onExit: { [weak self] in self?.stepFinished() })
return hostingController(rootView: view)
case .correctionRangePreMealOverrideEditor:
let view = CorrectionRangeOverridesEditor(mode: .acceptanceFlow, therapySettingsViewModel: therapySettingsViewModel!, preset: .preMeal)
let view = CorrectionRangeOverridesEditor(therapySettingsViewModel: therapySettingsViewModel!, preset: .preMeal)
return hostingController(rootView: view)
case .basalRatesInfo:
let view = BasalRatesInformationView(onExit: { [weak self] in self?.stepFinished() })
Expand Down Expand Up @@ -229,6 +232,7 @@ class OnboardingUICoordinator: UINavigationController, CGMManagerOnboarding, Pum
let rootView = rootView
.environmentObject(displayGlucosePreference)
.environment(\.appName, Bundle.main.bundleDisplayName)
.environment(\.dosingStrategySelectionEnabled, dosingStrategySelectionEnabled)
let hostingController = DismissibleHostingController(content: rootView, colorPalette: colorPalette)
return hostingController
}
Expand Down Expand Up @@ -271,20 +275,16 @@ class OnboardingUICoordinator: UINavigationController, CGMManagerOnboarding, Pum

private func setupWithNightscout() {
LoopKitAnalytics.shared.recordAnalyticsEvent("Onboarding With Nightscout", withProperties: nil, outOfSession: false)
switch onboardingProvider.onboardService(withIdentifier: OnboardingUICoordinator.serviceIdentifier) {
case .failure(let error):
log.debug("Failure to create and setup service with identifier '%{public}@': %{public}@", OnboardingUICoordinator.serviceIdentifier, String(describing: error))
case .success(let success):
switch success {
case .userInteractionRequired(var setupViewController):
nightscoutOnboardingViewController = setupViewController
setupViewController.serviceOnboardingDelegate = self
setupViewController.completionDelegate = self
show(setupViewController, sender: self)
case .createdAndOnboarded(let service):
self.service = service
checkForAvailableSettingsImport()
}
let result = NightscoutService.setupViewController(colorPalette: colorPalette, pluginHost: onboardingProvider, allowDebugFeatures: onboardingProvider.allowDebugFeatures)
switch result {
case .userInteractionRequired(var setupViewController):
nightscoutOnboardingViewController = setupViewController
setupViewController.serviceOnboardingDelegate = self
setupViewController.completionDelegate = self
show(setupViewController, sender: self)
case .createdAndOnboarded(let service):
self.service = service
checkForAvailableSettingsImport()
}
}

Expand All @@ -304,7 +304,7 @@ class OnboardingUICoordinator: UINavigationController, CGMManagerOnboarding, Pum
dailyItems: [.init(startTime: 0, value: 50)],
timeZone: .currentFixed),
carbRatioSchedule: CarbRatioSchedule(
unit: .gram(),
unit: .gram,
dailyItems: [.init(startTime: 0, value: 15)],
timeZone: .currentFixed),
basalRateSchedule: BasalRateSchedule(
Expand Down Expand Up @@ -344,21 +344,23 @@ class OnboardingUICoordinator: UINavigationController, CGMManagerOnboarding, Pum


private func constructTherapySettingsViewModel(therapySettings: TherapySettings) -> TherapySettingsViewModel? {
return TherapySettingsViewModel(therapySettings: therapySettings, pumpSupportedIncrements: nil, sensitivityOverridesEnabled: true, prescription: nil, delegate: self)
return TherapySettingsViewModel(therapySettings: therapySettings, pumpSupportedIncrements: nil, prescription: nil, delegate: self)
}
}

extension OnboardingUICoordinator: TherapySettingsViewModelDelegate {

func syncBasalRateSchedule(items: [RepeatingScheduleValue<Double>], completion: @escaping (Result<BasalRateSchedule, Error>) -> Void) {
// Since pump isn't set up, this syncing shouldn't do anything
assertionFailure()
}

func syncDeliveryLimits(deliveryLimits: DeliveryLimits, completion: @escaping (Result<DeliveryLimits, Error>) -> Void) {
func syncDeliveryLimits(deliveryLimits: LoopKit.DeliveryLimits) async throws -> LoopKit.DeliveryLimits {
// Since pump isn't set up, this syncing shouldn't do anything
assertionFailure()
return deliveryLimits
}

func saveCompletion(therapySettings: TherapySettings) {
stepFinished()
}
Expand Down Expand Up @@ -462,8 +464,5 @@ extension TherapySettings {
{
correctionRangeOverrides?.ranges[.preMeal] = nil
}

// workout mode obviated in DIY by overrides
correctionRangeOverrides?.ranges[.workout] = nil
}
}
1 change: 0 additions & 1 deletion LoopOnboardingKitUI/Views/AppleHealthAuthView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//

import SwiftUI
import HealthKit
import LoopKitUI

struct AppleHealthAuthView: View {
Expand Down
3 changes: 3 additions & 0 deletions LoopOnboardingKitUI/Views/WelcomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ struct WelcomeView: View {
Text(LocalizedString("Welcome to Loop", comment: "Title on WelcomeView"))
.font(.largeTitle)
.fontWeight(.semibold)

Image(frameworkImage: "Loop", decorative: true)
.onLongPressGesture(minimumDuration: 2) {
didLongPressOnLogo?()
}
.accessibilityHidden(false)
.accessibilityIdentifier("loopLogo")

Text(LocalizedString("Before using Loop you need to configure a few settings. These settings should be entered with precision and care; they are a critical part of how Loop determines the right amount of insulin to deliver.\n\nIf you are new to Loop, work with your diabetes support team to determine the settings that work best for you.", comment: "Descriptive text on WelcomeView"))
.foregroundColor(.secondary)
Expand Down