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
60 changes: 31 additions & 29 deletions Loop.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
4302F4E31D4EA54200F0FCAF /* InsulinDeliveryTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4302F4E21D4EA54200F0FCAF /* InsulinDeliveryTableViewController.swift */; };
4302F4E51D4EA75100F0FCAF /* DoseStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4302F4E41D4EA75100F0FCAF /* DoseStore.swift */; };
43076BF31DFDBC4B0012A723 /* it.lproj in Resources */ = {isa = PBXBuildFile; fileRef = 43076BF21DFDBC4B0012A723 /* it.lproj */; };
4309786C1E73D2F500BEBC82 /* it.lproj in Resources */ = {isa = PBXBuildFile; fileRef = 4309786B1E73D2F500BEBC82 /* it.lproj */; };
4309786E1E73DAD100BEBC82 /* CGM.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4309786D1E73DAD100BEBC82 /* CGM.swift */; };
430C1ABD1E5568A80067F1AE /* StatusChartManager+LoopKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 430C1ABC1E5568A80067F1AE /* StatusChartManager+LoopKit.swift */; };
430DA58E1D4AEC230097D1CA /* NSBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 430DA58D1D4AEC230097D1CA /* NSBundle.swift */; };
430DA5901D4B0E4C0097D1CA /* MySentryPumpStatusMessageBody.swift in Sources */ = {isa = PBXBuildFile; fileRef = 430DA58F1D4B0E4C0097D1CA /* MySentryPumpStatusMessageBody.swift */; };
Expand Down Expand Up @@ -74,6 +76,9 @@
438D42FB1D7D11A4003244B0 /* PredictionInputEffectTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 438D42FA1D7D11A4003244B0 /* PredictionInputEffectTableViewCell.swift */; };
439897371CD2F80600223065 /* AnalyticsManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 439897361CD2F80600223065 /* AnalyticsManager.swift */; };
4398973B1CD2FC2000223065 /* NSDateFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4398973A1CD2FC2000223065 /* NSDateFormatter.swift */; };
439BED2A1E76093C00B0AED5 /* CGMManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 439BED291E76093C00B0AED5 /* CGMManager.swift */; };
439BED2C1E760A7A00B0AED5 /* DexCGMManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 439BED2B1E760A7A00B0AED5 /* DexCGMManager.swift */; };
439BED2E1E760BC600B0AED5 /* EnliteCGMManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 439BED2D1E760BC600B0AED5 /* EnliteCGMManager.swift */; };
43A567691C94880B00334FAC /* LoopDataManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A567681C94880B00334FAC /* LoopDataManager.swift */; };
43A5676B1C96155700334FAC /* SwitchTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43A5676A1C96155700334FAC /* SwitchTableViewCell.swift */; };
43A943761B926B7B0051FA24 /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 43A943741B926B7B0051FA24 /* Interface.storyboard */; };
Expand Down Expand Up @@ -209,10 +214,7 @@
C17824A61E1AF91F00D9D25C /* BolusRecommendation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C17824A41E1AD4D100D9D25C /* BolusRecommendation.swift */; };
C17884631D51A7A400405663 /* BatteryIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = C17884621D51A7A400405663 /* BatteryIndicator.swift */; };
C18C8C511D5A351900E043FB /* NightscoutDataManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C18C8C501D5A351900E043FB /* NightscoutDataManager.swift */; };
C1C6591A1E1B1F430025CC58 /* (null) in Sources */ = {isa = PBXBuildFile; };
C1C6591C1E1B1FDA0025CC58 /* recommend_temp_basal_dropping_then_rising.json in Resources */ = {isa = PBXBuildFile; fileRef = C1C6591B1E1B1FDA0025CC58 /* recommend_temp_basal_dropping_then_rising.json */; };
C1C73F021DE3D0250022FC89 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C1C73F041DE3D0250022FC89 /* Localizable.strings */; };
C1C73F081DE3D0260022FC89 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C1C73F0A1DE3D0260022FC89 /* InfoPlist.strings */; };
C1C73F0D1DE3D0270022FC89 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C1C73F0F1DE3D0270022FC89 /* InfoPlist.strings */; };
C9886AE51E5B2FAD00473BB8 /* gallery.ckcomplication in Resources */ = {isa = PBXBuildFile; fileRef = C9886AE41E5B2FAD00473BB8 /* gallery.ckcomplication */; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -335,6 +337,8 @@
4302F4E21D4EA54200F0FCAF /* InsulinDeliveryTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = InsulinDeliveryTableViewController.swift; sourceTree = "<group>"; };
4302F4E41D4EA75100F0FCAF /* DoseStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DoseStore.swift; sourceTree = "<group>"; };
43076BF21DFDBC4B0012A723 /* it.lproj */ = {isa = PBXFileReference; lastKnownFileType = folder; path = it.lproj; sourceTree = "<group>"; };
4309786B1E73D2F500BEBC82 /* it.lproj */ = {isa = PBXFileReference; lastKnownFileType = folder; path = it.lproj; sourceTree = "<group>"; };
4309786D1E73DAD100BEBC82 /* CGM.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CGM.swift; sourceTree = "<group>"; };
430C1ABC1E5568A80067F1AE /* StatusChartManager+LoopKit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "StatusChartManager+LoopKit.swift"; sourceTree = "<group>"; };
430DA58D1D4AEC230097D1CA /* NSBundle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSBundle.swift; sourceTree = "<group>"; };
430DA58F1D4B0E4C0097D1CA /* MySentryPumpStatusMessageBody.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MySentryPumpStatusMessageBody.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -407,6 +411,9 @@
439897341CD2F7DE00223065 /* NSTimeInterval.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSTimeInterval.swift; sourceTree = "<group>"; };
439897361CD2F80600223065 /* AnalyticsManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = AnalyticsManager.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
4398973A1CD2FC2000223065 /* NSDateFormatter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NSDateFormatter.swift; sourceTree = "<group>"; };
439BED291E76093C00B0AED5 /* CGMManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CGMManager.swift; sourceTree = "<group>"; };
439BED2B1E760A7A00B0AED5 /* DexCGMManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DexCGMManager.swift; sourceTree = "<group>"; };
439BED2D1E760BC600B0AED5 /* EnliteCGMManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EnliteCGMManager.swift; sourceTree = "<group>"; };
43A567681C94880B00334FAC /* LoopDataManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = LoopDataManager.swift; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
43A5676A1C96155700334FAC /* SwitchTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwitchTableViewCell.swift; sourceTree = "<group>"; };
43A943721B926B7B0051FA24 /* WatchApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WatchApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -518,8 +525,6 @@
C17884621D51A7A400405663 /* BatteryIndicator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BatteryIndicator.swift; sourceTree = "<group>"; };
C18C8C501D5A351900E043FB /* NightscoutDataManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NightscoutDataManager.swift; sourceTree = "<group>"; };
C1C6591B1E1B1FDA0025CC58 /* recommend_temp_basal_dropping_then_rising.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = recommend_temp_basal_dropping_then_rising.json; sourceTree = "<group>"; };
C1C73F031DE3D0250022FC89 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Localizable.strings; sourceTree = "<group>"; };
C1C73F091DE3D0260022FC89 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/InfoPlist.strings; sourceTree = "<group>"; };
C1C73F0E1DE3D0270022FC89 /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/InfoPlist.strings; sourceTree = "<group>"; };
C9886AE41E5B2FAD00473BB8 /* gallery.ckcomplication */ = {isa = PBXFileReference; lastKnownFileType = folder; path = gallery.ckcomplication; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -627,20 +632,21 @@
children = (
43880F961D9D8052009061A8 /* ServiceAuthentication */,
43DE92601C555C26001FFDE1 /* AbsorptionTimeType+CarbKit.swift */,
C17824A41E1AD4D100D9D25C /* BolusRecommendation.swift */,
4309786D1E73DAD100BEBC82 /* CGM.swift */,
4331E0791C85650D00FBE832 /* ChartAxisValueDoubleLog.swift */,
43F41C321D3A17AA00C11ED6 /* ChartAxisValueDoubleUnit.swift */,
540DED961E14C75F002B2491 /* EnliteSensorDisplayable.swift */,
43E397A21D56B9E40028E321 /* Glucose.swift */,
4D5B7A4A1D457CCA00796CA9 /* GlucoseG4.swift */,
C178249D1E19B62300D9D25C /* GlucoseThreshold.swift */,
436FACED1D0BA636004E2427 /* InsulinDataSource.swift */,
436A0DA41D236A2A00104B24 /* LoopError.swift */,
430DA58F1D4B0E4C0097D1CA /* MySentryPumpStatusMessageBody.swift */,
4F526D601DF8D9A900A04910 /* NetBasal.swift */,
438D42F81D7C88BC003244B0 /* PredictionInputEffect.swift */,
43C418B41CE0575200405B6A /* ShareGlucose+GlucoseKit.swift */,
4328E0311CFC068900E199AA /* WatchContext+LoopKit.swift */,
C178249D1E19B62300D9D25C /* GlucoseThreshold.swift */,
C17824A41E1AD4D100D9D25C /* BolusRecommendation.swift */,
540DED961E14C75F002B2491 /* EnliteSensorDisplayable.swift */,
);
path = Models;
sourceTree = "<group>";
Expand Down Expand Up @@ -680,12 +686,11 @@
isa = PBXGroup;
children = (
C9886AE41E5B2FAD00473BB8 /* gallery.ckcomplication */,
4309786B1E73D2F500BEBC82 /* it.lproj */,
43EDEE6B1CF2E12A00393BE3 /* Loop.entitlements */,
43F5C2D41B92A4A6003EB13D /* Info.plist */,
43776F8F1B8022E90074EA36 /* AppDelegate.swift */,
43776F981B8022E90074EA36 /* Assets.xcassets */,
C1C73F0A1DE3D0260022FC89 /* InfoPlist.strings */,
C1C73F041DE3D0250022FC89 /* Localizable.strings */,
43776F9A1B8022E90074EA36 /* LaunchScreen.storyboard */,
43776F951B8022E90074EA36 /* Main.storyboard */,
43E344A01B9E144300C85C07 /* Extensions */,
Expand All @@ -710,6 +715,16 @@
path = ServiceAuthentication;
sourceTree = "<group>";
};
439BED281E76091600B0AED5 /* CGM */ = {
isa = PBXGroup;
children = (
439BED291E76093C00B0AED5 /* CGMManager.swift */,
439BED2B1E760A7A00B0AED5 /* DexCGMManager.swift */,
439BED2D1E760BC600B0AED5 /* EnliteCGMManager.swift */,
);
path = CGM;
sourceTree = "<group>";
};
43A943731B926B7B0051FA24 /* WatchApp */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -842,6 +857,7 @@
43F5C2E41B93C5D4003EB13D /* Managers */ = {
isa = PBXGroup;
children = (
439BED281E76091600B0AED5 /* CGM */,
439897361CD2F80600223065 /* AnalyticsManager.swift */,
43DBF0521C93EC8200B3C386 /* DeviceDataManager.swift */,
43F4EF1C1BA2A57600526CE1 /* DiagnosticLogger.swift */,
Expand Down Expand Up @@ -1238,13 +1254,12 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C1C73F081DE3D0260022FC89 /* InfoPlist.strings in Resources */,
43FCBBC21E51710B00343C1B /* LaunchScreen.storyboard in Resources */,
43776F991B8022E90074EA36 /* Assets.xcassets in Resources */,
434F54591D28805E002A9274 /* ButtonTableViewCell.xib in Resources */,
C1C73F021DE3D0250022FC89 /* Localizable.strings in Resources */,
43776F971B8022E90074EA36 /* Main.storyboard in Resources */,
C9886AE51E5B2FAD00473BB8 /* gallery.ckcomplication in Resources */,
4309786C1E73D2F500BEBC82 /* it.lproj in Resources */,
434F545B1D2880D4002A9274 /* AuthenticationTableViewCell.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -1362,6 +1377,7 @@
430DA58E1D4AEC230097D1CA /* NSBundle.swift in Sources */,
43776F901B8022E90074EA36 /* AppDelegate.swift in Sources */,
437CCADA1D284ADF0075D2C3 /* AuthenticationTableViewCell.swift in Sources */,
439BED2E1E760BC600B0AED5 /* EnliteCGMManager.swift in Sources */,
43CE7CDE1CA8B63E003CC1B0 /* Data.swift in Sources */,
43BFF0CB1E466C0900FF19A9 /* StateColorPalette.swift in Sources */,
43F41C331D3A17AA00C11ED6 /* ChartAxisValueDoubleUnit.swift in Sources */,
Expand Down Expand Up @@ -1393,10 +1409,12 @@
43BFF0BC1E45C80600FF19A9 /* UIColor+Loop.swift in Sources */,
43C0944A1CACCC73001F6403 /* NotificationManager.swift in Sources */,
434FF1EE1CF27EEF000DB779 /* UITableViewCell.swift in Sources */,
439BED2A1E76093C00B0AED5 /* CGMManager.swift in Sources */,
C18C8C511D5A351900E043FB /* NightscoutDataManager.swift in Sources */,
438849EA1D297CB6003B3F23 /* NightscoutService.swift in Sources */,
437CCADC1D284B830075D2C3 /* ButtonTableViewCell.swift in Sources */,
4315D2871CA5CC3B00589052 /* CarbEntryEditTableViewController.swift in Sources */,
4309786E1E73DAD100BEBC82 /* CGM.swift in Sources */,
43F5173D1D713DB0000FA422 /* RadioSelectionTableViewController.swift in Sources */,
4331E0781C85302200FBE832 /* CGPoint.swift in Sources */,
C178249A1E1999FA00D9D25C /* CaseCountable.swift in Sources */,
Expand Down Expand Up @@ -1424,6 +1442,7 @@
540DED971E14C75F002B2491 /* EnliteSensorDisplayable.swift in Sources */,
436A0DA51D236A2A00104B24 /* LoopError.swift in Sources */,
43E2D8C61D204678004DA55F /* KeychainManager.swift in Sources */,
439BED2C1E760A7A00B0AED5 /* DexCGMManager.swift in Sources */,
433EA4C21D9F39C900CD78FB /* PumpIDTableViewController.swift in Sources */,
43BFF0B21E45C18400FF19A9 /* UIColor.swift in Sources */,
43F78D261C8FC000002152D1 /* DoseMath.swift in Sources */,
Expand Down Expand Up @@ -1484,7 +1503,6 @@
43E2D8DB1D20C03B004DA55F /* NSTimeInterval.swift in Sources */,
43E2D8D41D20BF42004DA55F /* DoseMathTests.swift in Sources */,
C11C87DE1E21EAAD00BB71D3 /* HKUnit.swift in Sources */,
C1C6591A1E1B1F430025CC58 /* (null) in Sources */,
C17824A61E1AF91F00D9D25C /* BolusRecommendation.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -1609,22 +1627,6 @@
name = MainInterface.storyboard;
sourceTree = "<group>";
};
C1C73F041DE3D0250022FC89 /* Localizable.strings */ = {
isa = PBXVariantGroup;
children = (
C1C73F031DE3D0250022FC89 /* it */,
);
name = Localizable.strings;
sourceTree = "<group>";
};
C1C73F0A1DE3D0260022FC89 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
C1C73F091DE3D0260022FC89 /* it */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
C1C73F0F1DE3D0270022FC89 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
Expand Down
8 changes: 3 additions & 5 deletions Loop/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

private(set) lazy var dataManager = DeviceDataManager()
private(set) lazy var deviceManager = DeviceDataManager()

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
window?.tintColor = UIColor.tintColor
Expand All @@ -27,7 +27,7 @@ final class AppDelegate: UIResponder, UIApplicationDelegate {

if let navVC = window?.rootViewController as? UINavigationController,
let statusVC = navVC.viewControllers.first as? StatusTableViewController {
statusVC.dataManager = dataManager
statusVC.dataManager = deviceManager
}

return true
Expand All @@ -49,8 +49,6 @@ final class AppDelegate: UIResponder, UIApplicationDelegate {

func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.

dataManager.transmitter?.resumeScanning()
}

func applicationWillTerminate(_ application: UIApplication) {
Expand Down Expand Up @@ -79,7 +77,7 @@ extension AppDelegate: UNUserNotificationCenterDelegate {
{
AnalyticsManager.sharedManager.didRetryBolus()

dataManager.enactBolus(units: units) { (error) in
deviceManager.enactBolus(units: units) { (error) in
if error != nil {
NotificationManager.sendBolusFailureNotificationForAmount(units, atStartDate: startDate)
}
Expand Down
Loading