Skip to content
Closed
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
2 changes: 1 addition & 1 deletion Loop.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

// Change this on first setup to your own unique organization identifier in
// reverse-domain name syntax.
MAIN_APP_BUNDLE_IDENTIFIER = com.loopkit
MAIN_APP_BUNDLE_IDENTIFIER = com.loopkit.otistest12
16 changes: 8 additions & 8 deletions Loop.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2137,7 +2137,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Loop/Loop.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = 6Q7ZC8Q56M;
INFOPLIST_FILE = Loop/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
Expand All @@ -2155,7 +2155,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = Loop/Loop.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = 6Q7ZC8Q56M;
INFOPLIST_FILE = Loop/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
Expand All @@ -2171,7 +2171,7 @@
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = 6Q7ZC8Q56M;
INFOPLIST_FILE = "WatchApp Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "$(MAIN_APP_BUNDLE_IDENTIFIER).watchkitapp.watchkitextension";
Expand All @@ -2189,7 +2189,7 @@
ASSETCATALOG_COMPILER_COMPLICATION_NAME = Complication;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = 6Q7ZC8Q56M;
INFOPLIST_FILE = "WatchApp Extension/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "$(MAIN_APP_BUNDLE_IDENTIFIER).watchkitapp.watchkitextension";
Expand All @@ -2208,7 +2208,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = 6Q7ZC8Q56M;
IBSC_MODULE = WatchApp_Extension;
INFOPLIST_FILE = WatchApp/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
Expand All @@ -2228,7 +2228,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=watchos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = 6Q7ZC8Q56M;
IBSC_MODULE = WatchApp_Extension;
INFOPLIST_FILE = WatchApp/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
Expand Down Expand Up @@ -2306,7 +2306,7 @@
CODE_SIGN_ENTITLEMENTS = "Loop Status Extension/Loop Status Extension.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = 6Q7ZC8Q56M;
INFOPLIST_FILE = "Loop Status Extension/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
Expand All @@ -2326,7 +2326,7 @@
CODE_SIGN_ENTITLEMENTS = "Loop Status Extension/Loop Status Extension.entitlements";
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = 6Q7ZC8Q56M;
INFOPLIST_FILE = "Loop Status Extension/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks";
Expand Down
20 changes: 20 additions & 0 deletions Loop/View Controllers/SettingsTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -924,8 +924,13 @@ final class SettingsTableViewController: UITableViewController, DailyValueSchedu
if dataManager.loopManager.settings.activeBasalProfile == .standard && BasalRateSchedule(dailyItems: controller.scheduleItems, timeZone: controller.timeZone) == nil {
dataManager.loopManager.basalRateSchedule = nil
dataManager.loopManager.settings.activeBasalProfile = .notSet
return
}

if dataManager.loopManager.settings.activeBasalProfile == .standard {
dataManager.loopManager.basalRateSchedule = dataManager.loopManager.settings.basalProfileStandard
AnalyticsManager.shared.didChangeBasalRateSchedule()
}
}
case .basalRateA:
if let controller = controller as? SingleValueScheduleTableViewController {
Expand All @@ -934,7 +939,16 @@ final class SettingsTableViewController: UITableViewController, DailyValueSchedu
if dataManager.loopManager.settings.activeBasalProfile == .patternA && BasalRateSchedule(dailyItems: controller.scheduleItems, timeZone: controller.timeZone) == nil {
dataManager.loopManager.basalRateSchedule = nil
dataManager.loopManager.settings.activeBasalProfile = .notSet
return
}

if dataManager.loopManager.settings.activeBasalProfile == .patternA {
dataManager.loopManager.basalRateSchedule = dataManager.loopManager.settings.basalProfileA
AnalyticsManager.shared.didChangeBasalRateSchedule()
}



}

case .basalRateB:
Expand All @@ -943,6 +957,11 @@ final class SettingsTableViewController: UITableViewController, DailyValueSchedu
if dataManager.loopManager.settings.activeBasalProfile == .patternB && BasalRateSchedule(dailyItems: controller.scheduleItems, timeZone: controller.timeZone) == nil {
dataManager.loopManager.basalRateSchedule = nil
dataManager.loopManager.settings.activeBasalProfile = .notSet
return
}
if dataManager.loopManager.settings.activeBasalProfile == .patternB {
dataManager.loopManager.basalRateSchedule = dataManager.loopManager.settings.basalProfileB
AnalyticsManager.shared.didChangeBasalRateSchedule()
}
}

Expand All @@ -967,6 +986,7 @@ final class SettingsTableViewController: UITableViewController, DailyValueSchedu
}

tableView.reloadRows(at: [indexPath], with: .none)
tableView.reloadRows(at: [IndexPath(row: ConfigurationRow.activeBasalProfile.rawValue, section: Section.configuration.rawValue)], with: .none)
default:
break
}
Expand Down