Quellcode durchsuchen

Prepare diagnostics step in onboarding; no storage yet

Deniz Cengiz vor 1 Jahr
Ursprung
Commit
ed183fa0c8

+ 4 - 0
Trio.xcodeproj/project.pbxproj

@@ -638,6 +638,7 @@
 		DDE179712C910127003CDDB7 /* OverrideStored+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDE179512C910127003CDDB7 /* OverrideStored+CoreDataProperties.swift */; };
 		DDE179712C910127003CDDB7 /* OverrideStored+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDE179512C910127003CDDB7 /* OverrideStored+CoreDataProperties.swift */; };
 		DDEBB05C2D89E9050032305D /* TimeInRangeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDEBB05B2D89E9050032305D /* TimeInRangeType.swift */; };
 		DDEBB05C2D89E9050032305D /* TimeInRangeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDEBB05B2D89E9050032305D /* TimeInRangeType.swift */; };
 		DDF68FFC2D9ECF7F008BF16C /* OnboardingStateModel+Nightscout.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDF68FFB2D9ECF77008BF16C /* OnboardingStateModel+Nightscout.swift */; };
 		DDF68FFC2D9ECF7F008BF16C /* OnboardingStateModel+Nightscout.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDF68FFB2D9ECF77008BF16C /* OnboardingStateModel+Nightscout.swift */; };
+		DDF6902C2DA028D3008BF16C /* DiagnosticsStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDF6902B2DA028D3008BF16C /* DiagnosticsStepView.swift */; };
 		DDF847DD2C5C28720049BB3B /* LiveActivitySettingsDataFlow.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDF847DC2C5C28720049BB3B /* LiveActivitySettingsDataFlow.swift */; };
 		DDF847DD2C5C28720049BB3B /* LiveActivitySettingsDataFlow.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDF847DC2C5C28720049BB3B /* LiveActivitySettingsDataFlow.swift */; };
 		DDF847DF2C5C28780049BB3B /* LiveActivitySettingsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDF847DE2C5C28780049BB3B /* LiveActivitySettingsProvider.swift */; };
 		DDF847DF2C5C28780049BB3B /* LiveActivitySettingsProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDF847DE2C5C28780049BB3B /* LiveActivitySettingsProvider.swift */; };
 		DDF847E12C5C287F0049BB3B /* LiveActivitySettingsStateModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDF847E02C5C287F0049BB3B /* LiveActivitySettingsStateModel.swift */; };
 		DDF847E12C5C287F0049BB3B /* LiveActivitySettingsStateModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDF847E02C5C287F0049BB3B /* LiveActivitySettingsStateModel.swift */; };
@@ -1421,6 +1422,7 @@
 		DDE179512C910127003CDDB7 /* OverrideStored+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "OverrideStored+CoreDataProperties.swift"; sourceTree = "<group>"; };
 		DDE179512C910127003CDDB7 /* OverrideStored+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "OverrideStored+CoreDataProperties.swift"; sourceTree = "<group>"; };
 		DDEBB05B2D89E9050032305D /* TimeInRangeType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeInRangeType.swift; sourceTree = "<group>"; };
 		DDEBB05B2D89E9050032305D /* TimeInRangeType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeInRangeType.swift; sourceTree = "<group>"; };
 		DDF68FFB2D9ECF77008BF16C /* OnboardingStateModel+Nightscout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "OnboardingStateModel+Nightscout.swift"; sourceTree = "<group>"; };
 		DDF68FFB2D9ECF77008BF16C /* OnboardingStateModel+Nightscout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "OnboardingStateModel+Nightscout.swift"; sourceTree = "<group>"; };
+		DDF6902B2DA028D3008BF16C /* DiagnosticsStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DiagnosticsStepView.swift; sourceTree = "<group>"; };
 		DDF847DC2C5C28720049BB3B /* LiveActivitySettingsDataFlow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LiveActivitySettingsDataFlow.swift; sourceTree = "<group>"; };
 		DDF847DC2C5C28720049BB3B /* LiveActivitySettingsDataFlow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LiveActivitySettingsDataFlow.swift; sourceTree = "<group>"; };
 		DDF847DE2C5C28780049BB3B /* LiveActivitySettingsProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LiveActivitySettingsProvider.swift; sourceTree = "<group>"; };
 		DDF847DE2C5C28780049BB3B /* LiveActivitySettingsProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LiveActivitySettingsProvider.swift; sourceTree = "<group>"; };
 		DDF847E02C5C287F0049BB3B /* LiveActivitySettingsStateModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LiveActivitySettingsStateModel.swift; sourceTree = "<group>"; };
 		DDF847E02C5C287F0049BB3B /* LiveActivitySettingsStateModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LiveActivitySettingsStateModel.swift; sourceTree = "<group>"; };
@@ -2747,6 +2749,7 @@
 		BD47FDD52D8B64AE0043966B /* OnboardingSteps */ = {
 		BD47FDD52D8B64AE0043966B /* OnboardingSteps */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
+				DDF6902B2DA028D3008BF16C /* DiagnosticsStepView.swift */,
 				DD3F1F8E2D9E151200DCE7B3 /* Nightscout */,
 				DD3F1F8E2D9E151200DCE7B3 /* Nightscout */,
 				DD3F1F842D9DD83B00DCE7B3 /* DeliveryLimitsStepView.swift */,
 				DD3F1F842D9DD83B00DCE7B3 /* DeliveryLimitsStepView.swift */,
 				DD3F1F822D9DC78300DCE7B3 /* UnitSelectionStepView.swift */,
 				DD3F1F822D9DC78300DCE7B3 /* UnitSelectionStepView.swift */,
@@ -4172,6 +4175,7 @@
 				DD17452E2C55AE4800211FAC /* TargetBehavoirDataFlow.swift in Sources */,
 				DD17452E2C55AE4800211FAC /* TargetBehavoirDataFlow.swift in Sources */,
 				53F2382465BF74DB1A967C8B /* PumpConfigProvider.swift in Sources */,
 				53F2382465BF74DB1A967C8B /* PumpConfigProvider.swift in Sources */,
 				5D16287A969E64D18CE40E44 /* PumpConfigStateModel.swift in Sources */,
 				5D16287A969E64D18CE40E44 /* PumpConfigStateModel.swift in Sources */,
+				DDF6902C2DA028D3008BF16C /* DiagnosticsStepView.swift in Sources */,
 				19D466AA29AA3099004D5F33 /* MealSettingsRootView.swift in Sources */,
 				19D466AA29AA3099004D5F33 /* MealSettingsRootView.swift in Sources */,
 				CEF1ED6B2D58FB5800FAF41E /* CGMOptions.swift in Sources */,
 				CEF1ED6B2D58FB5800FAF41E /* CGMOptions.swift in Sources */,
 				E974172296125A5AE99E634C /* PumpConfigRootView.swift in Sources */,
 				E974172296125A5AE99E634C /* PumpConfigRootView.swift in Sources */,

+ 63 - 0
Trio/Sources/Localizations/Main/Localizable.xcstrings

@@ -8830,6 +8830,12 @@
         }
         }
       }
       }
     },
     },
+    "•  App diagnostic insights help us enhance app stability, ensure safety for all users, and enable us to quickly identify and resolve critical issues." : {
+
+    },
+    "•  Trio collects the App state on crash, device, iOS and general system info, and crash stack trace." : {
+
+    },
     "• A higher number means you need less insulin for the same amount of carbs" : {
     "• A higher number means you need less insulin for the same amount of carbs" : {
 
 
     },
     },
@@ -31051,6 +31057,9 @@
         }
         }
       }
       }
     },
     },
+    "All Set!" : {
+
+    },
     "All settings are at default values." : {
     "All settings are at default values." : {
       "localizations" : {
       "localizations" : {
         "bg" : {
         "bg" : {
@@ -43690,6 +43699,9 @@
         }
         }
       }
       }
     },
     },
+    "Before you can begin with configuring your therapy settigns, Trio needs to know which units you use for your glucose and insulin measurements (based on your pump model)." : {
+
+    },
     "Beta (TestFlight) Expires" : {
     "Beta (TestFlight) Expires" : {
       "localizations" : {
       "localizations" : {
         "bg" : {
         "bg" : {
@@ -46867,6 +46879,9 @@
         }
         }
       }
       }
     },
     },
+    "By default, Trio collects crash reports and other anonymized data related to errors, exceptions, and overall app performance." : {
+
+    },
     "Calculate a new Insulin Sensitivity Setting (ISF) upon every loop cycle. The new ISF will be based on your current Glucose, total daily dose of insulin (TDD, past 24 hours of all delivered insulin) and an individual Adjustment Factor (recommendation to start with is 0.5 if using Sigmoid Function and 0.8 if not).\n\nAll of the Dynamic ISF and CR adjustments will be limited by your autosens.min/max limits." : {
     "Calculate a new Insulin Sensitivity Setting (ISF) upon every loop cycle. The new ISF will be based on your current Glucose, total daily dose of insulin (TDD, past 24 hours of all delivered insulin) and an individual Adjustment Factor (recommendation to start with is 0.5 if using Sigmoid Function and 0.8 if not).\n\nAll of the Dynamic ISF and CR adjustments will be limited by your autosens.min/max limits." : {
       "comment" : "Enable Dynamic ISF",
       "comment" : "Enable Dynamic ISF",
       "extractionState" : "manual",
       "extractionState" : "manual",
@@ -49943,6 +49958,9 @@
         }
         }
       }
       }
     },
     },
+    "Carbohydrate Ratio" : {
+
+    },
     "Carbohydrates" : {
     "Carbohydrates" : {
       "localizations" : {
       "localizations" : {
         "bg" : {
         "bg" : {
@@ -71475,6 +71493,9 @@
         }
         }
       }
       }
     },
     },
+    "Delivery Limits" : {
+
+    },
     "Delta" : {
     "Delta" : {
       "localizations" : {
       "localizations" : {
         "bg" : {
         "bg" : {
@@ -73410,6 +73431,9 @@
         }
         }
       }
       }
     },
     },
+    "Diagnostics" : {
+
+    },
     "Direct connection with Libre 1 transmitters or European Libre 2 sensors" : {
     "Direct connection with Libre 1 transmitters or European Libre 2 sensors" : {
       "comment" : "Direct connection with Libre 1 transmitters or Libre 2",
       "comment" : "Direct connection with Libre 1 transmitters or Libre 2",
       "extractionState" : "manual",
       "extractionState" : "manual",
@@ -102474,6 +102498,9 @@
         }
         }
       }
       }
     },
     },
+    "Great job! You've completed the initial setup of Trio. You can always adjust these settings later in the app." : {
+
+    },
     "Green = At Target" : {
     "Green = At Target" : {
       "localizations" : {
       "localizations" : {
         "bg" : {
         "bg" : {
@@ -108923,6 +108950,9 @@
         }
         }
       }
       }
     },
     },
+    "If you prefer not to share this anonymized data, you can opt-out of data sharing." : {
+
+    },
     "If your CGM readings are below the Low value or above the High value, you will receive a glucose alarm." : {
     "If your CGM readings are below the Low value or above the High value, you will receive a glucose alarm." : {
       "localizations" : {
       "localizations" : {
         "bg" : {
         "bg" : {
@@ -136717,6 +136747,9 @@
         }
         }
       }
       }
     },
     },
+    "Nightscout is a cloud-based platform that allows you to store your diabetes data. It's often used by caregivers to remotely monitor what Trio is doing." : {
+
+    },
     "Nightscout ping: %d ms" : {
     "Nightscout ping: %d ms" : {
       "comment" : "Nightscout ping",
       "comment" : "Nightscout ping",
       "localizations" : {
       "localizations" : {
@@ -203716,6 +203749,9 @@
         }
         }
       }
       }
     },
     },
+    "Trio diagnostic data is sent to a Google Firebase Crashlytics project, which is securely maintained and accessed only by the Trio team." : {
+
+    },
     "Trio Discord" : {
     "Trio Discord" : {
       "localizations" : {
       "localizations" : {
         "bg" : {
         "bg" : {
@@ -204617,6 +204653,9 @@
         }
         }
       }
       }
     },
     },
+    "Trio is a powerful app that helps you manage your diabetes. Let's get started by setting up a few important parameters that will help Trio work effectively for you." : {
+
+    },
     "Trio is currently using these metrics and values as determined by the oref algorithm:" : {
     "Trio is currently using these metrics and values as determined by the oref algorithm:" : {
       "localizations" : {
       "localizations" : {
         "bg" : {
         "bg" : {
@@ -205121,6 +205160,9 @@
         }
         }
       }
       }
     },
     },
+    "Trio offers various delivery limits which represent the maximum amount of insulin it can deliver at a time. This helps ensure safe and effective experience." : {
+
+    },
     "Trio Personalization" : {
     "Trio Personalization" : {
       "localizations" : {
       "localizations" : {
         "bg" : {
         "bg" : {
@@ -208171,6 +208213,9 @@
         }
         }
       }
       }
     },
     },
+    "Units & Pump" : {
+
+    },
     "Units and Limits" : {
     "Units and Limits" : {
       "localizations" : {
       "localizations" : {
         "bg" : {
         "bg" : {
@@ -215405,6 +215450,9 @@
         }
         }
       }
       }
     },
     },
+    "Welcome to Trio" : {
+
+    },
     "Welcome to Trio - an automated insulin delivery system for iOS based on the OpenAPS algorithm with adaptations." : {
     "Welcome to Trio - an automated insulin delivery system for iOS based on the OpenAPS algorithm with adaptations." : {
 
 
     },
     },
@@ -217648,6 +217696,9 @@
         }
         }
       }
       }
     },
     },
+    "Why does Trio collect this data?" : {
+
+    },
     "Wide BG Target Range" : {
     "Wide BG Target Range" : {
       "comment" : "Headline \"Wide BG Target Range\"",
       "comment" : "Headline \"Wide BG Target Range\"",
       "extractionState" : "manual",
       "extractionState" : "manual",
@@ -219587,6 +219638,12 @@
     "You've successfully completed the initial setup of Trio. Tap 'Get Started' to save your settings and get ready to start using Trio." : {
     "You've successfully completed the initial setup of Trio. Tap 'Get Started' to save your settings and get ready to start using Trio." : {
 
 
     },
     },
+    "Your basal profile represents the amount of background insulin you need throughout the day. This helps Trio calculate your insulin needs." : {
+
+    },
+    "Your carb ratio tells how many grams of carbohydrates one unit of insulin will cover. This is essential for accurate meal bolus calculations." : {
+
+    },
     "Your entered amount was limited by your max Bolus setting of %d%@" : {
     "Your entered amount was limited by your max Bolus setting of %d%@" : {
       "comment" : "For the  Bolus View pop-up",
       "comment" : "For the  Bolus View pop-up",
       "extractionState" : "manual",
       "extractionState" : "manual",
@@ -219695,6 +219752,12 @@
         }
         }
       }
       }
     },
     },
+    "Your glucose target is the blood glucose level you aim to maintain. Trio will use this to calculate insulin doses and provide recommendations." : {
+
+    },
+    "Your insulin sensitivity factor (ISF) indicates how much one unit of insulin will lower your blood glucose. This helps calculate correction boluses." : {
+
+    },
     "Your phone or app is not enabled for NFC communications, which is needed to pair to libre2 sensors" : {
     "Your phone or app is not enabled for NFC communications, which is needed to pair to libre2 sensors" : {
       "extractionState" : "manual",
       "extractionState" : "manual",
       "localizations" : {
       "localizations" : {

+ 3 - 0
Trio/Sources/Modules/Onboarding/OnboardingStateModel.swift

@@ -15,6 +15,9 @@ extension Onboarding {
 
 
         private let settingsProvider = PickerSettingsProvider.shared
         private let settingsProvider = PickerSettingsProvider.shared
 
 
+        // App diagnostics sharing
+        var diagnostisSharingOption: DiagnostisSharingOption = .enabled
+
         // Nightscout Setup
         // Nightscout Setup
         var nightscoutSetupOption: NightscoutSetupOption = .noSelection
         var nightscoutSetupOption: NightscoutSetupOption = .noSelection
         var nightscoutImportOption: NightscoutImportOption = .noSelection
         var nightscoutImportOption: NightscoutImportOption = .noSelection

+ 48 - 0
Trio/Sources/Modules/Onboarding/View/OnboardingSteps/DiagnosticsStepView.swift

@@ -0,0 +1,48 @@
+import SwiftUI
+
+struct DiagnosticsStepView: View {
+    @Bindable var state: Onboarding.StateModel
+
+    var body: some View {
+        VStack(alignment: .leading, spacing: 20) {
+            Text("If you prefer not to share this anonymized data, you can opt-out of data sharing.")
+                .font(.headline)
+
+            ForEach(DiagnostisSharingOption.allCases, id: \.self) { option in
+                Button(action: {
+                    state.diagnostisSharingOption = option
+                }) {
+                    HStack {
+                        Image(systemName: state.diagnostisSharingOption == option ? "largecircle.fill.circle" : "circle")
+                            .foregroundColor(state.diagnostisSharingOption == option ? .accentColor : .secondary)
+                            .imageScale(.large)
+
+                        Text(option.displayName)
+                            .foregroundColor(.primary)
+
+                        Spacer()
+                    }
+                    .padding()
+                    .background(Color.chart.opacity(0.65))
+                    .cornerRadius(10)
+                }
+                .buttonStyle(.plain)
+            }
+
+            VStack(alignment: .leading, spacing: 8) {
+                Text("Why does Trio collect this data?").bold()
+                VStack(alignment: .leading, spacing: 4) {
+                    Text(
+                        "•  App diagnostic insights help us enhance app stability, ensure safety for all users, and enable us to quickly identify and resolve critical issues."
+                    )
+                    Text("•  Trio collects the App state on crash, device, iOS and general system info, and crash stack trace.")
+                }
+                Text(
+                    "Trio diagnostic data is sent to a Google Firebase Crashlytics project, which is securely maintained and accessed only by the Trio team."
+                )
+            }
+            .font(.footnote)
+            .foregroundStyle(Color.secondary)
+        }
+    }
+}

+ 62 - 18
Trio/Sources/Modules/Onboarding/View/OnboardingView+Util.swift

@@ -3,6 +3,7 @@ import SwiftUI
 /// Represents the different steps in the onboarding process.
 /// Represents the different steps in the onboarding process.
 enum OnboardingStep: Int, CaseIterable, Identifiable {
 enum OnboardingStep: Int, CaseIterable, Identifiable {
     case welcome
     case welcome
+    case diagnostics
     case nightscout
     case nightscout
     case unitSelection
     case unitSelection
     case glucoseTarget
     case glucoseTarget
@@ -27,23 +28,25 @@ enum OnboardingStep: Int, CaseIterable, Identifiable {
     var title: String {
     var title: String {
         switch self {
         switch self {
         case .welcome:
         case .welcome:
-            return "Welcome to Trio"
+            return String(localized: "Welcome to Trio")
+        case .diagnostics:
+            return String(localized: "Diagnostics")
         case .nightscout:
         case .nightscout:
-            return "Nightscout"
+            return String(localized: "Nightscout")
         case .unitSelection:
         case .unitSelection:
-            return "Units & Pump"
+            return String(localized: "Units & Pump")
         case .glucoseTarget:
         case .glucoseTarget:
-            return "Glucose Target"
+            return String(localized: "Glucose Target")
         case .basalProfile:
         case .basalProfile:
-            return "Basal Profile"
+            return String(localized: "Basal Profile")
         case .carbRatio:
         case .carbRatio:
-            return "Carbohydrate Ratio"
+            return String(localized: "Carbohydrate Ratio")
         case .insulinSensitivity:
         case .insulinSensitivity:
-            return "Insulin Sensitivity"
+            return String(localized: "Insulin Sensitivity")
         case .deliveryLimits:
         case .deliveryLimits:
-            return "Delivery Limits"
+            return String(localized: "Delivery Limits")
         case .completed:
         case .completed:
-            return "All Set!"
+            return String(localized: "All Set!")
         }
         }
     }
     }
 
 
@@ -51,23 +54,45 @@ enum OnboardingStep: Int, CaseIterable, Identifiable {
     var description: String {
     var description: String {
         switch self {
         switch self {
         case .welcome:
         case .welcome:
-            return "Trio is a powerful app that helps you manage your diabetes. Let's get started by setting up a few important parameters that will help Trio work effectively for you."
+            return String(
+                localized: "Trio is a powerful app that helps you manage your diabetes. Let's get started by setting up a few important parameters that will help Trio work effectively for you."
+            )
+        case .diagnostics:
+            return String(
+                localized: "By default, Trio collects crash reports and other anonymized data related to errors, exceptions, and overall app performance."
+            )
         case .nightscout:
         case .nightscout:
-            return "Nightscout is a cloud-based platform that allows you to store your diabetes data. It's often used by caregivers to remotely monitor what Trio is doing."
+            return String(
+                localized: "Nightscout is a cloud-based platform that allows you to store your diabetes data. It's often used by caregivers to remotely monitor what Trio is doing."
+            )
         case .unitSelection:
         case .unitSelection:
-            return "Before you can begin with configuring your therapy settigns, Trio needs to know which units you use for your glucose and insulin measurements (based on your pump model)."
+            return String(
+                localized: "Before you can begin with configuring your therapy settigns, Trio needs to know which units you use for your glucose and insulin measurements (based on your pump model)."
+            )
         case .glucoseTarget:
         case .glucoseTarget:
-            return "Your glucose target is the blood glucose level you aim to maintain. Trio will use this to calculate insulin doses and provide recommendations."
+            return String(
+                localized: "Your glucose target is the blood glucose level you aim to maintain. Trio will use this to calculate insulin doses and provide recommendations."
+            )
         case .basalProfile:
         case .basalProfile:
-            return "Your basal profile represents the amount of background insulin you need throughout the day. This helps Trio calculate your insulin needs."
+            return String(
+                localized: "Your basal profile represents the amount of background insulin you need throughout the day. This helps Trio calculate your insulin needs."
+            )
         case .carbRatio:
         case .carbRatio:
-            return "Your carb ratio tells how many grams of carbohydrates one unit of insulin will cover. This is essential for accurate meal bolus calculations."
+            return String(
+                localized: "Your carb ratio tells how many grams of carbohydrates one unit of insulin will cover. This is essential for accurate meal bolus calculations."
+            )
         case .insulinSensitivity:
         case .insulinSensitivity:
-            return "Your insulin sensitivity factor (ISF) indicates how much one unit of insulin will lower your blood glucose. This helps calculate correction boluses."
+            return String(
+                localized: "Your insulin sensitivity factor (ISF) indicates how much one unit of insulin will lower your blood glucose. This helps calculate correction boluses."
+            )
         case .deliveryLimits:
         case .deliveryLimits:
-            return "Trio offers various delivery limits which represent the maximum amount of insulin it can deliver at a time. This helps ensure safe and effective experience."
+            return String(
+                localized: "Trio offers various delivery limits which represent the maximum amount of insulin it can deliver at a time. This helps ensure safe and effective experience."
+            )
         case .completed:
         case .completed:
-            return "Great job! You've completed the initial setup of Trio. You can always adjust these settings later in the app."
+            return String(
+                localized: "Great job! You've completed the initial setup of Trio. You can always adjust these settings later in the app."
+            )
         }
         }
     }
     }
 
 
@@ -76,6 +101,8 @@ enum OnboardingStep: Int, CaseIterable, Identifiable {
         switch self {
         switch self {
         case .welcome:
         case .welcome:
             return "hand.wave.fill"
             return "hand.wave.fill"
+        case .diagnostics:
+            return "waveform.badge.magnifyingglass"
         case .nightscout:
         case .nightscout:
             return "owl"
             return "owl"
         case .unitSelection:
         case .unitSelection:
@@ -116,6 +143,7 @@ enum OnboardingStep: Int, CaseIterable, Identifiable {
         switch self {
         switch self {
         case .completed,
         case .completed,
              .deliveryLimits,
              .deliveryLimits,
+             .diagnostics,
              .nightscout,
              .nightscout,
              .unitSelection,
              .unitSelection,
              .welcome:
              .welcome:
@@ -207,6 +235,22 @@ enum DeliveryLimitSubstep: Int, CaseIterable, Identifiable {
     }
     }
 }
 }
 
 
+enum DiagnostisSharingOption: String, Equatable, CaseIterable, Identifiable {
+    case enabled
+    case disabled
+
+    var id: String { rawValue }
+
+    var displayName: String {
+        switch self {
+        case .enabled:
+            return "Enable Sharing"
+        case .disabled:
+            return "Disable Sharing"
+        }
+    }
+}
+
 enum PumpOptionsForOnboardingUnits: String, Equatable, CaseIterable, Identifiable {
 enum PumpOptionsForOnboardingUnits: String, Equatable, CaseIterable, Identifiable {
     case minimed
     case minimed
     case omnipodEros
     case omnipodEros

+ 2 - 0
Trio/Sources/Modules/Onboarding/View/OnboardingView.swift

@@ -117,6 +117,8 @@ extension Onboarding {
                                     switch currentStep {
                                     switch currentStep {
                                     case .welcome:
                                     case .welcome:
                                         WelcomeStepView()
                                         WelcomeStepView()
+                                    case .diagnostics:
+                                        DiagnosticsStepView(state: state)
                                     case .nightscout:
                                     case .nightscout:
                                         switch currentNightscoutSubstep {
                                         switch currentNightscoutSubstep {
                                         case .setupSelection:
                                         case .setupSelection: