From 6b37518895b9aa2d39b58f2d9915911be60daed4 Mon Sep 17 00:00:00 2001 From: marionbarker Date: Fri, 22 Mar 2024 14:11:29 -0700 Subject: [PATCH 1/4] Add Dexcom One+ to allowed prefix --- G7SensorKit/G7CGMManager/G7Sensor.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/G7SensorKit/G7CGMManager/G7Sensor.swift b/G7SensorKit/G7CGMManager/G7Sensor.swift index d5c0b46..b1745a1 100644 --- a/G7SensorKit/G7CGMManager/G7Sensor.swift +++ b/G7SensorKit/G7CGMManager/G7Sensor.swift @@ -215,7 +215,8 @@ public final class G7Sensor: G7BluetoothManagerDelegate { } /// The Dexcom G7 advertises a peripheral name of "DXCMxx", and later reports a full name of "Dexcomxx" - if name.hasPrefix("DXCM") { + /// Dexcom One+ peripheral name start with "DX02" + if name.hasPrefix("DXCM") || name.hasPrefix("DX02"){ // If we're following this name or if we're scanning, connect if let sensorName = sensorID, name.suffix(2) == sensorName.suffix(2) { return .makeActive From 45030412cd9543bae946bf09183388bf1755e233 Mon Sep 17 00:00:00 2001 From: marionbarker Date: Fri, 22 Mar 2024 14:50:01 -0700 Subject: [PATCH 2/4] Make G7 startup message more generic --- G7SensorKitUI/Views/G7StartupView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/G7SensorKitUI/Views/G7StartupView.swift b/G7SensorKitUI/Views/G7StartupView.swift index edc999c..44c19ba 100644 --- a/G7SensorKitUI/Views/G7StartupView.swift +++ b/G7SensorKitUI/Views/G7StartupView.swift @@ -26,7 +26,7 @@ struct G7StartupView: View { .frame(height: 120) .padding(.horizontal) }.frame(maxWidth: .infinity) - Text(LocalizedString("Loop can read G7 CGM data, but you must still use the Dexcom G7 App for pairing, calibration, and other sensor management.", comment: "Descriptive text on G7StartupView")) + Text(LocalizedString("This app can read G7 CGM data, but you must still use the Dexcom G7 App for pairing, calibration, and other sensor management.", comment: "Descriptive text on G7StartupView")) .fixedSize(horizontal: false, vertical: true) .foregroundColor(.secondary) Spacer() From 29ec310a7c7e958f778294f4846049e27f7705dc Mon Sep 17 00:00:00 2001 From: marionbarker Date: Tue, 9 Apr 2024 08:18:40 -0700 Subject: [PATCH 3/4] update text to use appName instead of Loop --- G7SensorKitUI/Views/G7StartupView.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/G7SensorKitUI/Views/G7StartupView.swift b/G7SensorKitUI/Views/G7StartupView.swift index 44c19ba..b7a4d07 100644 --- a/G7SensorKitUI/Views/G7StartupView.swift +++ b/G7SensorKitUI/Views/G7StartupView.swift @@ -13,6 +13,8 @@ struct G7StartupView: View { var didContinue: (() -> Void)? var didCancel: (() -> Void)? + @Environment(\.appName) private var appName + var body: some View { VStack(alignment: .center, spacing: 20) { Spacer() @@ -26,7 +28,7 @@ struct G7StartupView: View { .frame(height: 120) .padding(.horizontal) }.frame(maxWidth: .infinity) - Text(LocalizedString("This app can read G7 CGM data, but you must still use the Dexcom G7 App for pairing, calibration, and other sensor management.", comment: "Descriptive text on G7StartupView")) + Text(String(format: LocalizedString("%1$@ can read G7 CGM data, but you must still use the Dexcom G7 App for pairing, calibration, and other sensor management.", comment: "Descriptive text on G7StartupView (1: appName)"), self.appName)) .fixedSize(horizontal: false, vertical: true) .foregroundColor(.secondary) Spacer() From 3ad6902ce393a8b3f66e42f7b2e10e2bd1d803fc Mon Sep 17 00:00:00 2001 From: marionbarker Date: Tue, 9 Apr 2024 21:29:22 -0700 Subject: [PATCH 4/4] Defer appName changes --- G7SensorKitUI/Views/G7StartupView.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/G7SensorKitUI/Views/G7StartupView.swift b/G7SensorKitUI/Views/G7StartupView.swift index b7a4d07..edc999c 100644 --- a/G7SensorKitUI/Views/G7StartupView.swift +++ b/G7SensorKitUI/Views/G7StartupView.swift @@ -13,8 +13,6 @@ struct G7StartupView: View { var didContinue: (() -> Void)? var didCancel: (() -> Void)? - @Environment(\.appName) private var appName - var body: some View { VStack(alignment: .center, spacing: 20) { Spacer() @@ -28,7 +26,7 @@ struct G7StartupView: View { .frame(height: 120) .padding(.horizontal) }.frame(maxWidth: .infinity) - Text(String(format: LocalizedString("%1$@ can read G7 CGM data, but you must still use the Dexcom G7 App for pairing, calibration, and other sensor management.", comment: "Descriptive text on G7StartupView (1: appName)"), self.appName)) + Text(LocalizedString("Loop can read G7 CGM data, but you must still use the Dexcom G7 App for pairing, calibration, and other sensor management.", comment: "Descriptive text on G7StartupView")) .fixedSize(horizontal: false, vertical: true) .foregroundColor(.secondary) Spacer()