Skip to content

Commit 40bd34f

Browse files
committed
FPU remote from watch - missed commit
- PhoneSessionManager.swift: added back in mealWithFatProtein, maxProtein, and maxFat to the buildConfig() dictionary so they're actually sent to the watch - RemoteSettingsViewModel.swift: added PhoneSessionManager.shared.sendConfig() in $mealWithFatProtein so toggling it immediately pushes the new config to the watch
1 parent f2e4e4f commit 40bd34f

3 files changed

Lines changed: 15 additions & 9 deletions

File tree

LoopFollow.xcodeproj/project.pbxproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2634,7 +2634,7 @@
26342634
CODE_SIGN_ENTITLEMENTS = LoopFollowLAExtensionExtension.entitlements;
26352635
CODE_SIGN_STYLE = Automatic;
26362636
CURRENT_PROJECT_VERSION = 1;
2637-
DEVELOPMENT_TEAM = "";
2637+
DEVELOPMENT_TEAM = C6U8V99TR3;
26382638
ENABLE_APP_SANDBOX = NO;
26392639
ENABLE_HARDENED_RUNTIME = NO;
26402640
ENABLE_USER_SCRIPT_SANDBOXING = YES;
@@ -2686,7 +2686,7 @@
26862686
CODE_SIGN_ENTITLEMENTS = LoopFollowLAExtensionExtension.entitlements;
26872687
CODE_SIGN_STYLE = Automatic;
26882688
CURRENT_PROJECT_VERSION = 1;
2689-
DEVELOPMENT_TEAM = "";
2689+
DEVELOPMENT_TEAM = C6U8V99TR3;
26902690
ENABLE_APP_SANDBOX = NO;
26912691
ENABLE_HARDENED_RUNTIME = NO;
26922692
ENABLE_USER_SCRIPT_SANDBOXING = YES;
@@ -2735,7 +2735,7 @@
27352735
CODE_SIGN_ENTITLEMENTS = LoopFollowWatch/LoopFollowWatch.entitlements;
27362736
CODE_SIGN_STYLE = Automatic;
27372737
CURRENT_PROJECT_VERSION = 1;
2738-
DEVELOPMENT_TEAM = "";
2738+
DEVELOPMENT_TEAM = C6U8V99TR3;
27392739
GENERATE_INFOPLIST_FILE = NO;
27402740
INFOPLIST_FILE = LoopFollowWatch/Info.plist;
27412741
MARKETING_VERSION = "$(LOOP_FOLLOW_MARKETING_VERSION)";
@@ -2761,7 +2761,7 @@
27612761
CODE_SIGN_ENTITLEMENTS = LoopFollowWatch/LoopFollowWatch.entitlements;
27622762
CODE_SIGN_STYLE = Automatic;
27632763
CURRENT_PROJECT_VERSION = 1;
2764-
DEVELOPMENT_TEAM = "";
2764+
DEVELOPMENT_TEAM = C6U8V99TR3;
27652765
GENERATE_INFOPLIST_FILE = NO;
27662766
INFOPLIST_FILE = LoopFollowWatch/Info.plist;
27672767
MARKETING_VERSION = "$(LOOP_FOLLOW_MARKETING_VERSION)";
@@ -2785,7 +2785,7 @@
27852785
CODE_SIGN_ENTITLEMENTS = LoopFollowWidgets/LoopFollowWidgets.entitlements;
27862786
CODE_SIGN_STYLE = Automatic;
27872787
CURRENT_PROJECT_VERSION = 1;
2788-
DEVELOPMENT_TEAM = "";
2788+
DEVELOPMENT_TEAM = C6U8V99TR3;
27892789
GENERATE_INFOPLIST_FILE = NO;
27902790
INFOPLIST_FILE = LoopFollowWidgets/Info.plist;
27912791
MARKETING_VERSION = "$(LOOP_FOLLOW_MARKETING_VERSION)";
@@ -2810,7 +2810,7 @@
28102810
CODE_SIGN_ENTITLEMENTS = LoopFollowWidgets/LoopFollowWidgets.entitlements;
28112811
CODE_SIGN_STYLE = Automatic;
28122812
CURRENT_PROJECT_VERSION = 1;
2813-
DEVELOPMENT_TEAM = "";
2813+
DEVELOPMENT_TEAM = C6U8V99TR3;
28142814
GENERATE_INFOPLIST_FILE = NO;
28152815
INFOPLIST_FILE = LoopFollowWidgets/Info.plist;
28162816
MARKETING_VERSION = "$(LOOP_FOLLOW_MARKETING_VERSION)";
@@ -3020,7 +3020,7 @@
30203020
CODE_SIGN_ENTITLEMENTS = "LoopFollow/Loop Follow.entitlements";
30213021
CODE_SIGN_STYLE = Automatic;
30223022
DEFINES_MODULE = YES;
3023-
DEVELOPMENT_TEAM = "";
3023+
DEVELOPMENT_TEAM = C6U8V99TR3;
30243024
INFOPLIST_FILE = LoopFollow/Info.plist;
30253025
IPHONEOS_DEPLOYMENT_TARGET = 16.6;
30263026
LD_RUNPATH_SEARCH_PATHS = (
@@ -3045,7 +3045,7 @@
30453045
CODE_SIGN_ENTITLEMENTS = "LoopFollow/Loop Follow.entitlements";
30463046
CODE_SIGN_STYLE = Automatic;
30473047
DEFINES_MODULE = YES;
3048-
DEVELOPMENT_TEAM = "";
3048+
DEVELOPMENT_TEAM = C6U8V99TR3;
30493049
INFOPLIST_FILE = LoopFollow/Info.plist;
30503050
IPHONEOS_DEPLOYMENT_TARGET = 16.6;
30513051
LD_RUNPATH_SEARCH_PATHS = (

LoopFollow/Remote/Settings/RemoteSettingsViewModel.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ class RemoteSettingsViewModel: ObservableObject {
160160

161161
$mealWithFatProtein
162162
.dropFirst()
163-
.sink { [weak self] in self?.storage.mealWithFatProtein.value = $0 }
163+
.sink { [weak self] in
164+
self?.storage.mealWithFatProtein.value = $0
165+
PhoneSessionManager.shared.sendConfig()
166+
}
164167
.store(in: &cancellables)
165168

166169
// Device type monitoring

LoopFollow/Watch/PhoneSessionManager.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ class PhoneSessionManager: NSObject, WCSessionDelegate {
5555
"lfTeamId": lfTeamId,
5656
"lfBundleId": lfBundleId,
5757
"lfProductionEnv": lfProductionEnv,
58+
"mealWithFatProtein": Storage.shared.mealWithFatProtein.value,
59+
"maxProtein": Storage.shared.maxProtein.value.doubleValue(for: .gram()),
60+
"maxFat": Storage.shared.maxFat.value.doubleValue(for: .gram()),
5861
]
5962
}
6063

0 commit comments

Comments
 (0)