Skip to content

Commit 0f33cd5

Browse files
Fix debug vs release scheme and entitlements (#108)
* Fix debug vs release scheme and entitlements * fix final bugs --------- Co-authored-by: Jiwon Jeong <[email protected]>
1 parent 8b6b2de commit 0f33cd5

File tree

5 files changed

+19
-5
lines changed

5 files changed

+19
-5
lines changed

Uplift.xcodeproj/project.pbxproj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,10 +228,11 @@
228228
897703652BA2028D00F9992F /* ClassesViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassesViewModel.swift; sourceTree = "<group>"; };
229229
89950D892B992E8400DFB007 /* ClassesView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassesView.swift; sourceTree = "<group>"; };
230230
8996FEDF2BDF351800F13C67 /* NextSessionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NextSessionCell.swift; sourceTree = "<group>"; };
231+
899A597E2EA0BD02000CBC36 /* Uplift-Release.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Uplift-Release.entitlements"; sourceTree = "<group>"; };
231232
899B186C2CA5FAFB00FAC061 /* ProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileView.swift; sourceTree = "<group>"; };
232233
89A652F62D02B00000277A16 /* CapacityRemindersView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CapacityRemindersView.swift; sourceTree = "<group>"; };
233234
89A652F72D02B00000277A16 /* RemindersView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemindersView.swift; sourceTree = "<group>"; };
234-
89C10D222CCB459F007E753F /* Uplift.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Uplift.entitlements; sourceTree = "<group>"; };
235+
89C10D222CCB459F007E753F /* Uplift-Debug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = "Uplift-Debug.entitlements"; sourceTree = "<group>"; };
235236
89C34AA02CA66E9000C579A5 /* CapacityRemindersViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CapacityRemindersViewModel.swift; sourceTree = "<group>"; };
236237
89C8658C2BB4779C00758337 /* ClassCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClassCell.swift; sourceTree = "<group>"; };
237238
89E4FAA92CEFEC3000A952B1 /* CapacitySemiCircleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CapacitySemiCircleView.swift; sourceTree = "<group>"; };
@@ -528,7 +529,8 @@
528529
2E8FE38E2B1278B700B3DC6A /* Uplift */ = {
529530
isa = PBXGroup;
530531
children = (
531-
89C10D222CCB459F007E753F /* Uplift.entitlements */,
532+
899A597E2EA0BD02000CBC36 /* Uplift-Release.entitlements */,
533+
89C10D222CCB459F007E753F /* Uplift-Debug.entitlements */,
532534
2E3838402BB7536700AE15DC /* PrivacyInfo.xcprivacy */,
533535
2E3D6C1D2B12840C00B51BB2 /* Info.plist */,
534536
2E090ECF2B13088800BAE982 /* Configs */,
@@ -1046,7 +1048,7 @@
10461048
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
10471049
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
10481050
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
1049-
CODE_SIGN_ENTITLEMENTS = Uplift/Uplift.entitlements;
1051+
CODE_SIGN_ENTITLEMENTS = "Uplift/Uplift-Debug.entitlements";
10501052
CODE_SIGN_IDENTITY = "Apple Development";
10511053
CODE_SIGN_STYLE = Automatic;
10521054
CURRENT_PROJECT_VERSION = 47;
@@ -1091,7 +1093,7 @@
10911093
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
10921094
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
10931095
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
1094-
CODE_SIGN_ENTITLEMENTS = Uplift/Uplift.entitlements;
1096+
CODE_SIGN_ENTITLEMENTS = "Uplift/Uplift-Release.entitlements";
10951097
CODE_SIGN_IDENTITY = "Apple Development";
10961098
CODE_SIGN_STYLE = Automatic;
10971099
CURRENT_PROJECT_VERSION = 47;

Uplift.xcodeproj/xcshareddata/xcschemes/Uplift.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
</Testables>
4444
</TestAction>
4545
<LaunchAction
46-
buildConfiguration = "Release"
46+
buildConfiguration = "Debug"
4747
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4848
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
4949
launchStyle = "0"
File renamed without changes.

Uplift/Uplift-Release.entitlements

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>aps-environment</key>
6+
<string>production</string>
7+
</dict>
8+
</plist>

Uplift/ViewModels/CapacityRemindersViewModel.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ extension CapacityRemindersView {
121121
func createDefaultReminder() {
122122
let daysOfWeekStrings = selectedDays.map { $0.dayOfWeekComplete().uppercased() }
123123

124+
self.saveOriginalValues()
125+
124126
createCapacityReminder(
125127
capacityPercent: Int(capacityThreshold),
126128
daysOfWeek: daysOfWeekStrings,
@@ -335,6 +337,8 @@ extension CapacityRemindersView {
335337
return
336338
}
337339

340+
self.saveOriginalValues()
341+
338342
errorMessage = nil
339343
isLoading = true
340344
deletingReminder = true

0 commit comments

Comments
 (0)