Skip to content

Commit 75db2fe

Browse files
authored
Merge pull request #1553 from LoopKit/tidepool-merge
Tidepool merge
2 parents bb1bebe + 2f4e0c7 commit 75db2fe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1226
-394
lines changed

Common/FeatureFlags.swift

Lines changed: 49 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ import Foundation
1111
let FeatureFlags = FeatureFlagConfiguration()
1212

1313
struct FeatureFlagConfiguration: Decodable {
14+
let automaticBolusEnabled: Bool
1415
let cgmManagerCategorizeManualGlucoseRangeEnabled: Bool
1516
let criticalAlertsEnabled: Bool
1617
let entryDeletionEnabled: Bool
1718
let fiaspInsulinModelEnabled: Bool
1819
let includeServicesInSettingsEnabled: Bool
20+
let manualDoseEntryEnabled: Bool
1921
let mockTherapySettingsEnabled: Bool
2022
let nonlinearCarbModelEnabled: Bool
2123
let observeHealthKitSamplesFromOtherApps: Bool
@@ -25,10 +27,15 @@ struct FeatureFlagConfiguration: Decodable {
2527
let sensitivityOverridesEnabled: Bool
2628
let simulatedCoreDataEnabled: Bool
2729
let siriEnabled: Bool
28-
let automaticBolusEnabled: Bool
29-
let manualDoseEntryEnabled: Bool
3030

3131
fileprivate init() {
32+
// Swift compiler config is inverse, since the default state is enabled.
33+
#if AUTOMATIC_BOLUS_DISABLED
34+
self.automaticBolusEnabled = false
35+
#else
36+
self.automaticBolusEnabled = true
37+
#endif
38+
3239
#if CGM_MANAGER_CATEGORIZE_GLUCOSE_RANGE_ENABLED
3340
self.cgmManagerCategorizeManualGlucoseRangeEnabled = true
3441
#else
@@ -40,7 +47,7 @@ struct FeatureFlagConfiguration: Decodable {
4047
#else
4148
self.criticalAlertsEnabled = false
4249
#endif
43-
50+
4451
// Swift compiler config is inverse, since the default state is enabled.
4552
#if ENTRY_DELETION_DISABLED
4653
self.entryDeletionEnabled = false
@@ -69,6 +76,13 @@ struct FeatureFlagConfiguration: Decodable {
6976
self.includeServicesInSettingsEnabled = true
7077
#endif
7178

79+
// Swift compiler config is inverse, since the default state is enabled.
80+
#if MANUAL_DOSE_ENTRY_DISABLED
81+
self.manualDoseEntryEnabled = false
82+
#else
83+
self.manualDoseEntryEnabled = true
84+
#endif
85+
7286
// Swift compiler config is inverse, since the default state is enabled.
7387
#if MOCK_THERAPY_SETTINGS_ENABLED
7488
self.mockTherapySettingsEnabled = true
@@ -121,20 +135,6 @@ struct FeatureFlagConfiguration: Decodable {
121135
#else
122136
self.siriEnabled = true
123137
#endif
124-
125-
// Swift compiler config is inverse, since the default state is enabled.
126-
#if AUTOMATIC_BOLUS_DISABLED
127-
self.automaticBolusEnabled = false
128-
#else
129-
self.automaticBolusEnabled = true
130-
#endif
131-
132-
// Swift compiler config is inverse, since the default state is enabled.
133-
#if MANUAL_DOSE_ENTRY_DISABLED
134-
self.manualDoseEntryEnabled = false
135-
#else
136-
self.manualDoseEntryEnabled = true
137-
#endif
138138
}
139139
}
140140

@@ -157,7 +157,38 @@ extension FeatureFlagConfiguration : CustomDebugStringConvertible {
157157
"* simulatedCoreDataEnabled: \(simulatedCoreDataEnabled)",
158158
"* siriEnabled: \(siriEnabled)",
159159
"* automaticBolusEnabled: \(automaticBolusEnabled)",
160-
"* manualDoseEntryEnabled: \(manualDoseEntryEnabled)"
160+
"* manualDoseEntryEnabled: \(manualDoseEntryEnabled)",
161+
"* allowDebugFeatures: \(allowDebugFeatures)",
161162
].joined(separator: "\n")
162163
}
163164
}
165+
166+
extension FeatureFlagConfiguration {
167+
var allowDebugFeatures: Bool {
168+
if debugEnabled {
169+
return true
170+
}
171+
if UserDefaults.appGroup?.allowDebugFeatures ?? false {
172+
return true
173+
}
174+
#if ALLOW_DEBUG_FEATURES_ENABLED
175+
return true
176+
#else
177+
return false
178+
#endif
179+
}
180+
181+
var allowSimulators: Bool {
182+
if debugEnabled {
183+
return true
184+
}
185+
if UserDefaults.appGroup?.allowSimulators ?? false {
186+
return true
187+
}
188+
#if ALLOW_SIMULATORS_ENABLED
189+
return true
190+
#else
191+
return false
192+
#endif
193+
}
194+
}

Common/Models/PumpManager.swift

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,19 @@ import LoopKitUI
1111
import MockKit
1212
import MockKitUI
1313

14-
let staticPumpManagers: [PumpManagerUI.Type] = [
15-
MockPumpManager.self,
16-
]
17-
1814
let staticPumpManagersByIdentifier: [String: PumpManagerUI.Type] = [
1915
MockPumpManager.managerIdentifier : MockPumpManager.self
2016
]
2117

22-
let availableStaticPumpManagers = [
23-
PumpManagerDescriptor(identifier: MockPumpManager.managerIdentifier, localizedTitle: MockPumpManager.localizedTitle)
24-
]
18+
var availableStaticPumpManagers: [PumpManagerDescriptor] {
19+
if FeatureFlags.allowSimulators {
20+
return [
21+
PumpManagerDescriptor(identifier: MockPumpManager.managerIdentifier, localizedTitle: MockPumpManager.localizedTitle)
22+
]
23+
} else {
24+
return []
25+
}
26+
}
2527

2628
extension PumpManager {
2729
var rawValue: [String: Any] {

Common/Models/WatchHistoricalGlucose.swift

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ extension WatchHistoricalGlucose: RawRepresentable {
4545
let isDisplayOnlys: [Bool]
4646
let wasUserEntereds: [Bool]
4747
let devices: [Data?]
48+
let healthKitEligibleDates: [Date?]
4849

4950
init(samples: [StoredGlucoseSample]) {
5051
self.uuids = samples.map { $0.uuid }
@@ -57,20 +58,22 @@ extension WatchHistoricalGlucose: RawRepresentable {
5758
self.isDisplayOnlys = samples.map { $0.isDisplayOnly }
5859
self.wasUserEntereds = samples.map { $0.wasUserEntered }
5960
self.devices = samples.map { try? WatchHistoricalGlucose.encoder.encode($0.device) }
61+
self.healthKitEligibleDates = samples.map { $0.healthKitEligibleDate }
6062
}
6163

6264
var samples: [StoredGlucoseSample] {
6365
return (0..<uuids.count).map {
6466
return StoredGlucoseSample(uuid: uuids[$0],
65-
provenanceIdentifier: provenanceIdentifiers[$0],
66-
syncIdentifier: syncIdentifiers[$0],
67-
syncVersion: syncVersions[$0],
68-
startDate: startDates[$0],
69-
quantity: HKQuantity(unit: .milligramsPerDeciliter, doubleValue: quantities[$0]),
70-
trend: trends[$0],
71-
isDisplayOnly: isDisplayOnlys[$0],
72-
wasUserEntered: wasUserEntereds[$0],
73-
device: devices[$0].flatMap { try? HKDevice(from: $0) })
67+
provenanceIdentifier: provenanceIdentifiers[$0],
68+
syncIdentifier: syncIdentifiers[$0],
69+
syncVersion: syncVersions[$0],
70+
startDate: startDates[$0],
71+
quantity: HKQuantity(unit: .milligramsPerDeciliter, doubleValue: quantities[$0]),
72+
trend: trends[$0],
73+
isDisplayOnly: isDisplayOnlys[$0],
74+
wasUserEntered: wasUserEntereds[$0],
75+
device: devices[$0].flatMap { try? HKDevice(from: $0) },
76+
healthKitEligibleDate: healthKitEligibleDates[$0])
7477
}
7578
}
7679
}

Loop.xcodeproj/project.pbxproj

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,16 @@
2626
1D080CBD2473214A00356610 /* AlertStore.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 1D080CBB2473214A00356610 /* AlertStore.xcdatamodeld */; };
2727
1D12D3B92548EFDD00B53E8B /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D12D3B82548EFDD00B53E8B /* main.swift */; };
2828
1D2609AD248EEB9900A6F258 /* LoopAlertsManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D2609AC248EEB9900A6F258 /* LoopAlertsManager.swift */; };
29+
1D3F0F7526D59B6C004A5960 /* Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = 892A5D58222F0A27008961AB /* Debug.swift */; };
30+
1D3F0F7626D59DCD004A5960 /* Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = 892A5D58222F0A27008961AB /* Debug.swift */; };
31+
1D3F0F7726D59DCE004A5960 /* Debug.swift in Sources */ = {isa = PBXBuildFile; fileRef = 892A5D58222F0A27008961AB /* Debug.swift */; };
2932
1D49795824E7289700948F05 /* ServicesViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D49795724E7289700948F05 /* ServicesViewModel.swift */; };
3033
1D4990E824A25931005CC357 /* FeatureFlags.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89E267FB2292456700A3F2AF /* FeatureFlags.swift */; };
3134
1D4A3E2D2478628500FD601B /* StoredAlert+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D4A3E2B2478628500FD601B /* StoredAlert+CoreDataClass.swift */; };
3235
1D4A3E2E2478628500FD601B /* StoredAlert+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D4A3E2C2478628500FD601B /* StoredAlert+CoreDataProperties.swift */; };
36+
1D63DEA526E950D400F46FA5 /* VersionCheckServicesManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D63DEA426E950D400F46FA5 /* VersionCheckServicesManager.swift */; };
3337
1D6B1B6726866D89009AC446 /* AlertPermissionsChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D6B1B6626866D89009AC446 /* AlertPermissionsChecker.swift */; };
38+
1D70C40126EC0F9D00C62570 /* VersionCheckServicesManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D70C40026EC0F9D00C62570 /* VersionCheckServicesManagerTests.swift */; };
3439
1D80313D24746274002810DF /* AlertStoreTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D80313C24746274002810DF /* AlertStoreTests.swift */; };
3540
1D82E6A025377C6B009131FB /* TrustedTimeChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D82E69F25377C6B009131FB /* TrustedTimeChecker.swift */; };
3641
1D8D55BC252274650044DBB6 /* BolusEntryViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D8D55BB252274650044DBB6 /* BolusEntryViewModelTests.swift */; };
@@ -375,6 +380,7 @@
375380
89FE21AD24AC57E30033F501 /* Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89FE21AC24AC57E30033F501 /* Collection.swift */; };
376381
A90EF53C25DEF06200F32D61 /* PluginManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C16DA84122E8E112008624C2 /* PluginManager.swift */; };
377382
A90EF54425DEF0A000F32D61 /* OSLog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4374B5EE209D84BE00D17AA8 /* OSLog.swift */; };
383+
A91D2A3F26CF0FF80023B075 /* IconTitleSubtitleTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A91D2A3E26CF0FF80023B075 /* IconTitleSubtitleTableViewCell.swift */; };
378384
A91E4C2124F867A700BE9213 /* StoredAlertTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A91E4C2024F867A700BE9213 /* StoredAlertTests.swift */; };
379385
A91E4C2324F86F1000BE9213 /* CriticalEventLogExportManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A91E4C2224F86F1000BE9213 /* CriticalEventLogExportManagerTests.swift */; };
380386
A92E557E2464DFFD00DB93BB /* DosingDecisionStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = A92E557D2464DFFD00DB93BB /* DosingDecisionStore.swift */; };
@@ -775,7 +781,9 @@
775781
1D49795724E7289700948F05 /* ServicesViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ServicesViewModel.swift; sourceTree = "<group>"; };
776782
1D4A3E2B2478628500FD601B /* StoredAlert+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "StoredAlert+CoreDataClass.swift"; sourceTree = "<group>"; };
777783
1D4A3E2C2478628500FD601B /* StoredAlert+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "StoredAlert+CoreDataProperties.swift"; sourceTree = "<group>"; };
784+
1D63DEA426E950D400F46FA5 /* VersionCheckServicesManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VersionCheckServicesManager.swift; sourceTree = "<group>"; };
778785
1D6B1B6626866D89009AC446 /* AlertPermissionsChecker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertPermissionsChecker.swift; sourceTree = "<group>"; };
786+
1D70C40026EC0F9D00C62570 /* VersionCheckServicesManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VersionCheckServicesManagerTests.swift; sourceTree = "<group>"; };
779787
1D80313C24746274002810DF /* AlertStoreTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertStoreTests.swift; sourceTree = "<group>"; };
780788
1D82E69F25377C6B009131FB /* TrustedTimeChecker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrustedTimeChecker.swift; sourceTree = "<group>"; };
781789
1D8D55BB252274650044DBB6 /* BolusEntryViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BolusEntryViewModelTests.swift; sourceTree = "<group>"; };
@@ -1289,6 +1297,7 @@
12891297
89F9119324358E4500ECCAF3 /* CarbAbsorptionTime.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarbAbsorptionTime.swift; sourceTree = "<group>"; };
12901298
89F9119524358E6900ECCAF3 /* BolusPickerValues.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BolusPickerValues.swift; sourceTree = "<group>"; };
12911299
89FE21AC24AC57E30033F501 /* Collection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Collection.swift; sourceTree = "<group>"; };
1300+
A91D2A3E26CF0FF80023B075 /* IconTitleSubtitleTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconTitleSubtitleTableViewCell.swift; sourceTree = "<group>"; };
12921301
A91E4C2024F867A700BE9213 /* StoredAlertTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StoredAlertTests.swift; sourceTree = "<group>"; };
12931302
A91E4C2224F86F1000BE9213 /* CriticalEventLogExportManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CriticalEventLogExportManagerTests.swift; sourceTree = "<group>"; };
12941303
A92E557D2464DFFD00DB93BB /* DosingDecisionStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = DosingDecisionStore.swift; path = ../Stores/DosingDecisionStore.swift; sourceTree = "<group>"; };
@@ -1629,11 +1638,12 @@
16291638
isa = PBXGroup;
16301639
children = (
16311640
1DA7A84024476E98008257F0 /* Alerts */,
1641+
C16575722538AFF6004AE16E /* CGMStalenessMonitorTests.swift */,
16321642
A91E4C2224F86F1000BE9213 /* CriticalEventLogExportManagerTests.swift */,
1643+
C16B983F26B4898800256B05 /* DoseEnactorTests.swift */,
16331644
E9C58A7124DB489100487A17 /* LoopDataManagerTests.swift */,
1645+
1D70C40026EC0F9D00C62570 /* VersionCheckServicesManagerTests.swift */,
16341646
A9F5F1F4251050EC00E7C8A4 /* ZipArchiveTests.swift */,
1635-
C16575722538AFF6004AE16E /* CGMStalenessMonitorTests.swift */,
1636-
C16B983F26B4898800256B05 /* DoseEnactorTests.swift */,
16371647
);
16381648
path = Managers;
16391649
sourceTree = "<group>";
@@ -2052,6 +2062,7 @@
20522062
A9A056B224B93C62007CF06D /* CriticalEventLogExportView.swift */,
20532063
43D381611EBD9759007F8C8F /* HeaderValuesTableViewCell.swift */,
20542064
430D85881F44037000AF2D4F /* HUDViewTableViewCell.swift */,
2065+
A91D2A3E26CF0FF80023B075 /* IconTitleSubtitleTableViewCell.swift */,
20552066
1DA46B5F2492E2E300D71A63 /* NotificationsCriticalAlertPermissionsView.swift */,
20562067
899433B723FE129700FA4BEA /* OverrideBadgeView.swift */,
20572068
89D6953D23B6DF8A002B3066 /* PotentialCarbEntryTableViewCell.swift */,
@@ -2096,6 +2107,7 @@
20962107
4F70C20F1DE8FAC5006380B7 /* ExtensionDataManager.swift */,
20972108
89ADE13A226BFA0F0067222B /* TestingScenariosManager.swift */,
20982109
1D82E69F25377C6B009131FB /* TrustedTimeChecker.swift */,
2110+
1D63DEA426E950D400F46FA5 /* VersionCheckServicesManager.swift */,
20992111
4328E0341CFC0AE100E199AA /* WatchDataManager.swift */,
21002112
1DA6499D2441266400F61E75 /* Alerts */,
21012113
E95D37FF24EADE68005E2F50 /* Store Protocols */,
@@ -3491,6 +3503,7 @@
34913503
89CA2B32226C18B8004D9350 /* TestingScenariosTableViewController.swift in Sources */,
34923504
43E93FB71E469A5100EAB8DB /* HKUnit.swift in Sources */,
34933505
43C05CAF21EB2C24006FB252 /* NSBundle.swift in Sources */,
3506+
A91D2A3F26CF0FF80023B075 /* IconTitleSubtitleTableViewCell.swift in Sources */,
34943507
A967D94C24F99B9300CDDF8A /* OutputStream.swift in Sources */,
34953508
1DB1065124467E18005542BD /* AlertManager.swift in Sources */,
34963509
1D9650C82523FBA100A1370B /* DeviceDataManager+BolusEntryViewModelDelegate.swift in Sources */,
@@ -3530,6 +3543,7 @@
35303543
899433B823FE129800FA4BEA /* OverrideBadgeView.swift in Sources */,
35313544
89D1503E24B506EB00EDE253 /* Dictionary.swift in Sources */,
35323545
4302F4E31D4EA54200F0FCAF /* InsulinDeliveryTableViewController.swift in Sources */,
3546+
1D63DEA526E950D400F46FA5 /* VersionCheckServicesManager.swift in Sources */,
35333547
4FC8C8011DEB93E400A1452E /* NSUserDefaults+StatusExtension.swift in Sources */,
35343548
43E93FB61E469A4000EAB8DB /* NumberFormatter.swift in Sources */,
35353549
C1FB428C217806A400FAB378 /* StateColorPalette.swift in Sources */,
@@ -3616,6 +3630,7 @@
36163630
439A7945211FE23A0041B75F /* NSUserActivity.swift in Sources */,
36173631
43A943881B926B7B0051FA24 /* ExtensionDelegate.swift in Sources */,
36183632
43511CEE220FC61700566C63 /* HUDRowController.swift in Sources */,
3633+
1D3F0F7526D59B6C004A5960 /* Debug.swift in Sources */,
36193634
892FB4CD22040104005293EC /* OverridePresetRow.swift in Sources */,
36203635
4F75F00220FCFE8C00B5570E /* GlucoseChartScene.swift in Sources */,
36213636
89E26800229267DF00A3F2AF /* Optional.swift in Sources */,
@@ -3795,6 +3810,7 @@
37953810
C16575732538AFF6004AE16E /* CGMStalenessMonitorTests.swift in Sources */,
37963811
A9E6DFEA246A0448005B1A1C /* PumpManagerErrorTests.swift in Sources */,
37973812
1DA7A84424477698008257F0 /* InAppModalAlertIssuerTests.swift in Sources */,
3813+
1D70C40126EC0F9D00C62570 /* VersionCheckServicesManagerTests.swift in Sources */,
37983814
E93E86A824DDCC4400FF40C8 /* MockDoseStore.swift in Sources */,
37993815
E98A55F124EDD85E0008715D /* MockDosingDecisionStore.swift in Sources */,
38003816
8968B114240C55F10074BB48 /* LoopSettingsTests.swift in Sources */,
@@ -3837,6 +3853,7 @@
38373853
43BFF0CD1E466C8400FF19A9 /* StateColorPalette.swift in Sources */,
38383854
4FC8C8021DEB943800A1452E /* NSUserDefaults+StatusExtension.swift in Sources */,
38393855
4F70C2121DE900EA006380B7 /* StatusExtensionContext.swift in Sources */,
3856+
1D3F0F7626D59DCD004A5960 /* Debug.swift in Sources */,
38403857
4F70C1E11DE8DCA7006380B7 /* StatusViewController.swift in Sources */,
38413858
A90EF54425DEF0A000F32D61 /* OSLog.swift in Sources */,
38423859
);
@@ -3909,6 +3926,7 @@
39093926
E9B07FEE253BBC7100BAD8F8 /* OverrideIntentHandler.swift in Sources */,
39103927
E942DE9F253BE6A900AC532D /* NSTimeInterval.swift in Sources */,
39113928
E9B08016253BBD7300BAD8F8 /* UserDefaults+LoopIntents.swift in Sources */,
3929+
1D3F0F7726D59DCE004A5960 /* Debug.swift in Sources */,
39123930
E942DF34253BF87F00AC532D /* Intents.intentdefinition in Sources */,
39133931
E9B07F7F253BBA6500BAD8F8 /* IntentHandler.swift in Sources */,
39143932
);

Loop/AppDelegate.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ final class AppDelegate: UIResponder, UIApplicationDelegate, WindowProvider {
5252
// MARK: - UIApplicationDelegate - Environment
5353

5454
func applicationProtectedDataDidBecomeAvailable(_ application: UIApplication) {
55-
if !loopAppManager.isLaunchComplete {
56-
loopAppManager.launch()
55+
DispatchQueue.main.async {
56+
if self.loopAppManager.isLaunchPending {
57+
self.loopAppManager.launch()
58+
}
5759
}
5860
}
5961

0 commit comments

Comments
 (0)