@@ -16,12 +16,16 @@ struct FeatureFlagConfiguration: Decodable {
1616 let criticalAlertsEnabled : Bool
1717 let entryDeletionEnabled : Bool
1818 let fiaspInsulinModelEnabled : Bool
19+ let lyumjevInsulinModelEnabled : Bool
20+ let afrezzaInsulinModelEnabled : Bool
1921 let includeServicesInSettingsEnabled : Bool
2022 let manualDoseEntryEnabled : Bool
2123 let insulinDeliveryReservoirViewEnabled : Bool
2224 let mockTherapySettingsEnabled : Bool
2325 let nonlinearCarbModelEnabled : Bool
24- let observeHealthKitSamplesFromOtherApps : Bool
26+ let observeHealthKitCarbSamplesFromOtherApps : Bool
27+ let observeHealthKitDoseSamplesFromOtherApps : Bool
28+ let observeHealthKitGlucoseSamplesFromOtherApps : Bool
2529 let remoteOverridesEnabled : Bool
2630 let predictedGlucoseChartClampEnabled : Bool
2731 let scenariosEnabled : Bool
@@ -71,6 +75,20 @@ struct FeatureFlagConfiguration: Decodable {
7175 #else
7276 self . fiaspInsulinModelEnabled = true
7377 #endif
78+
79+ // Swift compiler config is inverse, since the default state is enabled.
80+ #if LYUMJEV_INSULIN_MODEL_DISABLED
81+ self . lyumjevInsulinModelEnabled = false
82+ #else
83+ self . lyumjevInsulinModelEnabled = true
84+ #endif
85+
86+ // Swift compiler config is inverse, since the default state is enabled.
87+ #if AFREZZA_INSULIN_MODEL_DISABLED
88+ self . afrezzaInsulinModelEnabled = false
89+ #else
90+ self . afrezzaInsulinModelEnabled = true
91+ #endif
7492
7593 // Swift compiler config is inverse, since the default state is enabled.
7694 #if INCLUDE_SERVICES_IN_SETTINGS_DISABLED
@@ -93,7 +111,6 @@ struct FeatureFlagConfiguration: Decodable {
93111 self . insulinDeliveryReservoirViewEnabled = true
94112 #endif
95113
96- // Swift compiler config is inverse, since the default state is enabled.
97114 #if MOCK_THERAPY_SETTINGS_ENABLED
98115 self . mockTherapySettingsEnabled = true
99116 #else
@@ -107,13 +124,31 @@ struct FeatureFlagConfiguration: Decodable {
107124 self . nonlinearCarbModelEnabled = true
108125 #endif
109126
127+ #if OBSERVE_HEALTH_KIT_CARB_SAMPLES_FROM_OTHER_APPS_ENABLED
128+ self . observeHealthKitCarbSamplesFromOtherApps = true
129+ #else
130+ self . observeHealthKitCarbSamplesFromOtherApps = false
131+ #endif
132+
110133 // Swift compiler config is inverse, since the default state is enabled.
111134 #if OBSERVE_HEALTH_KIT_SAMPLES_FROM_OTHER_APPS_DISABLED
112- self . observeHealthKitSamplesFromOtherApps = false
135+ self . observeHealthKitDoseSamplesFromOtherApps = false
136+ self . observeHealthKitGlucoseSamplesFromOtherApps = false
113137 #else
114- self . observeHealthKitSamplesFromOtherApps = true
138+ self . observeHealthKitDoseSamplesFromOtherApps = true
139+ self . observeHealthKitGlucoseSamplesFromOtherApps = true
140+ #endif
141+
142+ // Swift compiler config is inverse, since the default state is enabled.
143+ #if OBSERVE_HEALTH_KIT_DOSE_SAMPLES_FROM_OTHER_APPS_DISABLED
144+ self . observeHealthKitDoseSamplesFromOtherApps = false
115145 #endif
116146
147+ // Swift compiler config is inverse, since the default state is enabled.
148+ #if OBSERVE_HEALTH_KIT_GLUCOSE_SAMPLES_FROM_OTHER_APPS_DISABLED
149+ self . observeHealthKitGlucoseSamplesFromOtherApps = false
150+ #endif
151+
117152 #if PREDICTED_GLUCOSE_CHART_CLAMP_ENABLED
118153 self . predictedGlucoseChartClampEnabled = true
119154 #else
@@ -169,10 +204,14 @@ extension FeatureFlagConfiguration : CustomDebugStringConvertible {
169204 " * criticalAlertsEnabled: \( criticalAlertsEnabled) " ,
170205 " * entryDeletionEnabled: \( entryDeletionEnabled) " ,
171206 " * fiaspInsulinModelEnabled: \( fiaspInsulinModelEnabled) " ,
207+ " * lyumjevInsulinModelEnabled: \( lyumjevInsulinModelEnabled) " ,
208+ " * afrezzaInsulinModelEnabled: \( afrezzaInsulinModelEnabled) " ,
172209 " * includeServicesInSettingsEnabled: \( includeServicesInSettingsEnabled) " ,
173210 " * mockTherapySettingsEnabled: \( mockTherapySettingsEnabled) " ,
174211 " * nonlinearCarbModelEnabled: \( nonlinearCarbModelEnabled) " ,
175- " * observeHealthKitSamplesFromOtherApps: \( observeHealthKitSamplesFromOtherApps) " ,
212+ " * observeHealthKitCarbSamplesFromOtherApps: \( observeHealthKitCarbSamplesFromOtherApps) " ,
213+ " * observeHealthKitDoseSamplesFromOtherApps: \( observeHealthKitDoseSamplesFromOtherApps) " ,
214+ " * observeHealthKitGlucoseSamplesFromOtherApps: \( observeHealthKitGlucoseSamplesFromOtherApps) " ,
176215 " * predictedGlucoseChartClampEnabled: \( predictedGlucoseChartClampEnabled) " ,
177216 " * remoteOverridesEnabled: \( remoteOverridesEnabled) " ,
178217 " * scenariosEnabled: \( scenariosEnabled) " ,
@@ -190,30 +229,26 @@ extension FeatureFlagConfiguration : CustomDebugStringConvertible {
190229
191230extension FeatureFlagConfiguration {
192231 var allowDebugFeatures : Bool {
193- if debugEnabled {
194- return true
195- }
196- if UserDefaults . appGroup? . allowDebugFeatures ?? false {
197- return true
198- }
199232 #if ALLOW_DEBUG_FEATURES_ENABLED
200233 return true
201234 #else
202- return false
235+ if UserDefaults . appGroup? . allowDebugFeatures ?? false {
236+ return true
237+ } else {
238+ return false
239+ }
203240 #endif
204241 }
205242
206243 var allowSimulators : Bool {
207- if debugEnabled {
208- return true
209- }
210- if UserDefaults . appGroup? . allowSimulators ?? false {
211- return true
212- }
213244 #if ALLOW_SIMULATORS_ENABLED
214245 return true
215246 #else
216- return false
247+ if UserDefaults . appGroup? . allowSimulators ?? false {
248+ return true
249+ } else {
250+ return false
251+ }
217252 #endif
218253 }
219254}
0 commit comments