Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions Loop.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
1D4A3E2D2478628500FD601B /* StoredAlert+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D4A3E2B2478628500FD601B /* StoredAlert+CoreDataClass.swift */; };
1D4A3E2E2478628500FD601B /* StoredAlert+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D4A3E2C2478628500FD601B /* StoredAlert+CoreDataProperties.swift */; };
1D63DEA526E950D400F46FA5 /* SupportManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D63DEA426E950D400F46FA5 /* SupportManager.swift */; };
C1A55E012E9F000000A10002 /* IssueReportSubmitter.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1A55E012E9F000000A10001 /* IssueReportSubmitter.swift */; };
1D6B1B6726866D89009AC446 /* AlertPermissionsChecker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D6B1B6626866D89009AC446 /* AlertPermissionsChecker.swift */; };
1D70C40126EC0F9D00C62570 /* SupportManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D70C40026EC0F9D00C62570 /* SupportManagerTests.swift */; };
1D80313D24746274002810DF /* AlertStoreTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D80313C24746274002810DF /* AlertStoreTests.swift */; };
Expand Down Expand Up @@ -105,7 +104,6 @@
4328E0351CFC0AE100E199AA /* WatchDataManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4328E0341CFC0AE100E199AA /* WatchDataManager.swift */; };
432CF87520D8AC950066B889 /* NSUserDefaults+WatchApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4328E0231CFBE2C500E199AA /* NSUserDefaults+WatchApp.swift */; };
432E73CB1D24B3D6009AD15D /* RemoteDataServicesManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 432E73CA1D24B3D6009AD15D /* RemoteDataServicesManager.swift */; };
433EA4C41D9F71C800CD78FB /* CommandResponseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 433EA4C31D9F71C800CD78FB /* CommandResponseViewController.swift */; };
4344628220A7A37F00C4BE6F /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4344628120A7A37E00C4BE6F /* CoreBluetooth.framework */; };
4344629220A7C19800C4BE6F /* ButtonGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4344629120A7C19800C4BE6F /* ButtonGroup.swift */; };
4344629820A8B2D700C4BE6F /* OSLog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4374B5EE209D84BE00D17AA8 /* OSLog.swift */; };
Expand Down Expand Up @@ -345,7 +343,6 @@
A987CD4924A58A0100439ADC /* ZipArchive.swift in Sources */ = {isa = PBXBuildFile; fileRef = A987CD4824A58A0100439ADC /* ZipArchive.swift */; };
A999D40624663D18004C89D4 /* PumpManagerError.swift in Sources */ = {isa = PBXBuildFile; fileRef = A999D40524663D18004C89D4 /* PumpManagerError.swift */; };
A9A056B324B93C62007CF06D /* CriticalEventLogExportView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9A056B224B93C62007CF06D /* CriticalEventLogExportView.swift */; };
C1A55E012E9F000000A10004 /* SendIssueReportView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1A55E012E9F000000A10003 /* SendIssueReportView.swift */; };
A9A056B524B94123007CF06D /* CriticalEventLogExportViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9A056B424B94123007CF06D /* CriticalEventLogExportViewModel.swift */; };
A9A63F8E246B271600588D5B /* NSTimeInterval.swift in Sources */ = {isa = PBXBuildFile; fileRef = 439897341CD2F7DE00223065 /* NSTimeInterval.swift */; };
A9B607B0247F000F00792BE4 /* UserNotifications+Loop.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9B607AF247F000F00792BE4 /* UserNotifications+Loop.swift */; };
Expand Down Expand Up @@ -791,7 +788,6 @@
1D4A3E2B2478628500FD601B /* StoredAlert+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "StoredAlert+CoreDataClass.swift"; sourceTree = "<group>"; };
1D4A3E2C2478628500FD601B /* StoredAlert+CoreDataProperties.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "StoredAlert+CoreDataProperties.swift"; sourceTree = "<group>"; };
1D63DEA426E950D400F46FA5 /* SupportManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SupportManager.swift; sourceTree = "<group>"; };
C1A55E012E9F000000A10001 /* IssueReportSubmitter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IssueReportSubmitter.swift; sourceTree = "<group>"; };
1D6B1B6626866D89009AC446 /* AlertPermissionsChecker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertPermissionsChecker.swift; sourceTree = "<group>"; };
1D70C40026EC0F9D00C62570 /* SupportManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SupportManagerTests.swift; sourceTree = "<group>"; };
1D80313C24746274002810DF /* AlertStoreTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertStoreTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -844,7 +840,6 @@
4328E0341CFC0AE100E199AA /* WatchDataManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = WatchDataManager.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
432E73CA1D24B3D6009AD15D /* RemoteDataServicesManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RemoteDataServicesManager.swift; sourceTree = "<group>"; };
4337615E1D52F487004A3647 /* GlucoseHUDView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GlucoseHUDView.swift; sourceTree = "<group>"; };
433EA4C31D9F71C800CD78FB /* CommandResponseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CommandResponseViewController.swift; sourceTree = "<group>"; };
4344628120A7A37E00C4BE6F /* CoreBluetooth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreBluetooth.framework; path = Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreBluetooth.framework; sourceTree = DEVELOPER_DIR; };
4344628320A7A3BE00C4BE6F /* LoopKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = LoopKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4344628420A7A3BE00C4BE6F /* CGMBLEKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = CGMBLEKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -1157,7 +1152,6 @@
A987CD4824A58A0100439ADC /* ZipArchive.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZipArchive.swift; sourceTree = "<group>"; };
A999D40524663D18004C89D4 /* PumpManagerError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PumpManagerError.swift; sourceTree = "<group>"; };
A9A056B224B93C62007CF06D /* CriticalEventLogExportView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CriticalEventLogExportView.swift; sourceTree = "<group>"; };
C1A55E012E9F000000A10003 /* SendIssueReportView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SendIssueReportView.swift; sourceTree = "<group>"; };
A9A056B424B94123007CF06D /* CriticalEventLogExportViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CriticalEventLogExportViewModel.swift; sourceTree = "<group>"; };
A9B607AF247F000F00792BE4 /* UserNotifications+Loop.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UserNotifications+Loop.swift"; sourceTree = "<group>"; };
A9B996EF27235191002DC09C /* LoopWarning.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoopWarning.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1956,7 +1950,6 @@
children = (
43A51E1E1EB6D62A000736CC /* CarbAbsorptionViewController.swift */,
43A51E201EB6DBDD000736CC /* LoopChartsTableViewController.swift */,
433EA4C31D9F71C800CD78FB /* CommandResponseViewController.swift */,
C178249F1E19CF9800D9D25C /* GlucoseThresholdTableViewController.swift */,
4302F4E21D4EA54200F0FCAF /* InsulinDeliveryTableViewController.swift */,
437D9BA21D7BC977007245E8 /* PredictionTableViewController.swift */,
Expand All @@ -1980,7 +1973,6 @@
149A28BC2A853E6C00052EDF /* CarbEntryView.swift */,
431A8C3F1EC6E8AB00823B9C /* CircleMaskView.swift */,
A9A056B224B93C62007CF06D /* CriticalEventLogExportView.swift */,
C1A55E012E9F000000A10003 /* SendIssueReportView.swift */,
C191D2A025B3ACAA00C26C0B /* DosingStrategySelectionView.swift */,
149A28E32A8A63A700052EDF /* FavoriteFoodDetailView.swift */,
142CB75A2A60BFC30075748A /* FavoriteFoodsView.swift */,
Expand Down Expand Up @@ -2038,7 +2030,6 @@
B470F5832AB22B5100049695 /* StatefulPluggable.swift */,
43FCEEA8221A615B0013DD30 /* StatusChartsManager.swift */,
1D63DEA426E950D400F46FA5 /* SupportManager.swift */,
C1A55E012E9F000000A10001 /* IssueReportSubmitter.swift */,
4F70C20F1DE8FAC5006380B7 /* ExtensionDataManager.swift */,
89ADE13A226BFA0F0067222B /* TestingScenariosManager.swift */,
1D82E69F25377C6B009131FB /* TrustedTimeChecker.swift */,
Expand Down Expand Up @@ -3395,7 +3386,6 @@
897A5A9624C2175B00C4E71D /* BolusEntryView.swift in Sources */,
4F70C2131DE90339006380B7 /* StatusExtensionContext.swift in Sources */,
A9A056B324B93C62007CF06D /* CriticalEventLogExportView.swift in Sources */,
C1A55E012E9F000000A10004 /* SendIssueReportView.swift in Sources */,
43C05CC521EC29E3006FB252 /* TextFieldTableViewCell.swift in Sources */,
4FF4D1001E18374700846527 /* WatchContext.swift in Sources */,
C1D289B522F90A52003FFBD9 /* BasalDeliveryState.swift in Sources */,
Expand Down Expand Up @@ -3516,7 +3506,6 @@
A96DAC2C2838F31200D94E38 /* SharedLogging.swift in Sources */,
4302F4E31D4EA54200F0FCAF /* InsulinDeliveryTableViewController.swift in Sources */,
1D63DEA526E950D400F46FA5 /* SupportManager.swift in Sources */,
C1A55E012E9F000000A10002 /* IssueReportSubmitter.swift in Sources */,
4FC8C8011DEB93E400A1452E /* NSUserDefaults+StatusExtension.swift in Sources */,
43E93FB61E469A4000EAB8DB /* NumberFormatter.swift in Sources */,
C1FB428C217806A400FAB378 /* StateColorPalette.swift in Sources */,
Expand All @@ -3541,7 +3530,6 @@
A987CD4924A58A0100439ADC /* ZipArchive.swift in Sources */,
43F41C371D3BF32400C11ED6 /* UIAlertController.swift in Sources */,
A9CBE45C248ACC03008E7BA2 /* SettingsStore+SimulatedCoreData.swift in Sources */,
433EA4C41D9F71C800CD78FB /* CommandResponseViewController.swift in Sources */,
E9B3552229358C440076AB04 /* MealDetectionManager.swift in Sources */,
C16DA84222E8E112008624C2 /* PluginManager.swift in Sources */,
43785E932120A01B0057DED1 /* NewCarbEntryIntent+Loop.swift in Sources */,
Expand Down
3 changes: 3 additions & 0 deletions Loop/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -19028,6 +19028,7 @@
},
"Export Critical Event Logs" : {
"comment" : "The title of the export critical event logs in support",
"extractionState" : "stale",
"localizations" : {
"da" : {
"stringUnit" : {
Expand Down Expand Up @@ -24168,6 +24169,7 @@
},
"Issue Report" : {
"comment" : "The title text for the issue report menu item\nThe view controller title for the issue report screen",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -24804,6 +24806,7 @@
},
"Loading..." : {
"comment" : "The loading message for the diagnostic report screen",
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down
139 changes: 0 additions & 139 deletions Loop/Managers/IssueReportSubmitter.swift

This file was deleted.

3 changes: 2 additions & 1 deletion Loop/Managers/LoopAppManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ class LoopAppManager: NSObject {
supportManager = SupportManager(pluginManager: pluginManager,
deviceSupportDelegate: deviceDataManager,
servicesManager: deviceDataManager.servicesManager,
alertIssuer: alertManager)
alertIssuer: alertManager,
criticalEventLogExporterFactory: deviceDataManager.criticalEventLogExportManager)

setWhitelistedDevices()

Expand Down
16 changes: 13 additions & 3 deletions Loop/Managers/SupportManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,21 @@ public final class SupportManager {
private let pluginManager: PluginManager
private let staticSupportTypes: [SupportUI.Type]
private let staticSupportTypesByIdentifier: [String: SupportUI.Type]
private let criticalEventLogExporterFactory: CriticalEventLogExporterFactory?

lazy private var cancellables = Set<AnyCancellable>()

init(pluginManager: PluginManager,
deviceSupportDelegate: DeviceSupportDelegate,
servicesManager: ServicesManager? = nil,
staticSupportTypes: [SupportUI.Type]? = nil,
alertIssuer: AlertIssuer) {

alertIssuer: AlertIssuer,
criticalEventLogExporterFactory: CriticalEventLogExporterFactory? = nil) {

self.alertIssuer = alertIssuer
self.deviceSupportDelegate = deviceSupportDelegate
self.pluginManager = pluginManager
self.criticalEventLogExporterFactory = criticalEventLogExporterFactory
self.staticSupportTypes = []
staticSupportTypesByIdentifier = self.staticSupportTypes.reduce(into: [:]) { (map, type) in
map[type.pluginIdentifier] = type
Expand Down Expand Up @@ -217,7 +220,14 @@ extension SupportManager: SupportUIDelegate {
public func openURL(url: URL) {
UIApplication.shared.open(url)
}


public func criticalEventLogExportView() -> AnyView {
guard let criticalEventLogExporterFactory else {
return AnyView(EmptyView())
}
return AnyView(CriticalEventLogExportView(viewModel: CriticalEventLogExportViewModel(exporterFactory: criticalEventLogExporterFactory)))
}

public var pumpStatus: LoopKit.PumpManagerStatus? {
deviceSupportDelegate.pumpManagerStatus
}
Expand Down
Loading