diff --git a/Common/FeatureFlags.swift b/Common/FeatureFlags.swift index 92b1aa1d91..b2f0953ee9 100644 --- a/Common/FeatureFlags.swift +++ b/Common/FeatureFlags.swift @@ -26,7 +26,7 @@ struct FeatureFlagConfiguration: Decodable { let observeHealthKitCarbSamplesFromOtherApps: Bool let observeHealthKitDoseSamplesFromOtherApps: Bool let observeHealthKitGlucoseSamplesFromOtherApps: Bool - let remoteOverridesEnabled: Bool + let remoteCommandsEnabled: Bool let predictedGlucoseChartClampEnabled: Bool let scenariosEnabled: Bool let sensitivityOverridesEnabled: Bool @@ -161,10 +161,10 @@ struct FeatureFlagConfiguration: Decodable { #endif // Swift compiler config is inverse, since the default state is enabled. - #if REMOTE_OVERRIDES_DISABLED - self.remoteOverridesEnabled = false + #if REMOTE_COMMANDS_DISABLED || REMOTE_OVERRIDES_DISABLED //REMOTE_OVERRIDES_DISABLED: backwards compatibility of Loop 3 & prior + self.remoteCommandsEnabled = false #else - self.remoteOverridesEnabled = true + self.remoteCommandsEnabled = true #endif #if SCENARIOS_ENABLED @@ -240,7 +240,7 @@ extension FeatureFlagConfiguration : CustomDebugStringConvertible { "* observeHealthKitDoseSamplesFromOtherApps: \(observeHealthKitDoseSamplesFromOtherApps)", "* observeHealthKitGlucoseSamplesFromOtherApps: \(observeHealthKitGlucoseSamplesFromOtherApps)", "* predictedGlucoseChartClampEnabled: \(predictedGlucoseChartClampEnabled)", - "* remoteOverridesEnabled: \(remoteOverridesEnabled)", + "* remoteCommandsEnabled: \(remoteCommandsEnabled)", "* scenariosEnabled: \(scenariosEnabled)", "* sensitivityOverridesEnabled: \(sensitivityOverridesEnabled)", "* showEventualBloodGlucoseOnWatchEnabled: \(showEventualBloodGlucoseOnWatchEnabled)", diff --git a/Loop/Managers/DeviceDataManager.swift b/Loop/Managers/DeviceDataManager.swift index 762eb0408b..10217dc51a 100644 --- a/Loop/Managers/DeviceDataManager.swift +++ b/Loop/Managers/DeviceDataManager.swift @@ -1347,8 +1347,8 @@ extension DeviceDataManager { log.default("Remote Notification: Finished handling") } - guard FeatureFlags.remoteOverridesEnabled else { - log.error("Remote Notification: Overrides not enabled.") + guard FeatureFlags.remoteCommandsEnabled else { + log.error("Remote Notification: Remote Commands not enabled.") return } diff --git a/Loop/Managers/LoopAppManager.swift b/Loop/Managers/LoopAppManager.swift index f7c5db8a9c..4a350635e7 100644 --- a/Loop/Managers/LoopAppManager.swift +++ b/Loop/Managers/LoopAppManager.swift @@ -106,7 +106,7 @@ class LoopAppManager: NSObject { registerBackgroundTasks() - if FeatureFlags.remoteOverridesEnabled { + if FeatureFlags.remoteCommandsEnabled { DispatchQueue.main.async { #if targetEnvironment(simulator) self.remoteNotificationRegistrationDidFinish(.failure(SimulatorError.remoteNotificationsNotAvailable)) diff --git a/Loop/Managers/SettingsManager.swift b/Loop/Managers/SettingsManager.swift index 567a2f4387..e52cada0d1 100644 --- a/Loop/Managers/SettingsManager.swift +++ b/Loop/Managers/SettingsManager.swift @@ -160,7 +160,7 @@ class SettingsManager { latestSettings = mergedSettings - if remoteNotificationRegistrationResult == nil && FeatureFlags.remoteOverridesEnabled { + if remoteNotificationRegistrationResult == nil && FeatureFlags.remoteCommandsEnabled { // remote notification registration not finished return }