Skip to content

Commit 7dad38f

Browse files
authored
Merge pull request #412 from 36-APPJAM-HEARTZ/refactor/#407-planQASeungjun
Refactor/#407 3차 스프린트 1차 기획 QA 사항 반영 (승준)
2 parents 77a21be + bb7324b commit 7dad38f

10 files changed

Lines changed: 101 additions & 33 deletions

File tree

ByeBoo-iOS/ByeBoo-iOS.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@
307307
CODE_SIGN_ENTITLEMENTS = "ByeBoo-iOS/ByeBoo-Dev.entitlements";
308308
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
309309
CODE_SIGN_STYLE = Manual;
310-
CURRENT_PROJECT_VERSION = 6;
310+
CURRENT_PROJECT_VERSION = 7;
311311
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
312312
DEVELOPMENT_TEAM = "";
313313
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = Z6682N5G5D;
@@ -351,7 +351,7 @@
351351
CODE_SIGN_IDENTITY = "Apple Development";
352352
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
353353
CODE_SIGN_STYLE = Manual;
354-
CURRENT_PROJECT_VERSION = 6;
354+
CURRENT_PROJECT_VERSION = 7;
355355
DEVELOPMENT_TEAM = "";
356356
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = Z6682N5G5D;
357357
GENERATE_INFOPLIST_FILE = YES;
@@ -512,7 +512,7 @@
512512
buildSettings = {
513513
BUNDLE_LOADER = "$(TEST_HOST)";
514514
CODE_SIGN_STYLE = Automatic;
515-
CURRENT_PROJECT_VERSION = 6;
515+
CURRENT_PROJECT_VERSION = 7;
516516
GENERATE_INFOPLIST_FILE = YES;
517517
IPHONEOS_DEPLOYMENT_TARGET = 18.2;
518518
MACOSX_DEPLOYMENT_TARGET = 15.2;
@@ -534,7 +534,7 @@
534534
buildSettings = {
535535
BUNDLE_LOADER = "$(TEST_HOST)";
536536
CODE_SIGN_STYLE = Automatic;
537-
CURRENT_PROJECT_VERSION = 6;
537+
CURRENT_PROJECT_VERSION = 7;
538538
GENERATE_INFOPLIST_FILE = YES;
539539
IPHONEOS_DEPLOYMENT_TARGET = 18.2;
540540
MACOSX_DEPLOYMENT_TARGET = 15.2;

ByeBoo-iOS/ByeBoo-iOS/Presentation/Enum/JourneyType+Presentation.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ extension JourneyType {
1919
}
2020
}
2121

22+
var tagTitle: String {
23+
switch self {
24+
case .recording:
25+
"이별"
26+
case .active:
27+
"행동형"
28+
case .reunion:
29+
"재회"
30+
}
31+
}
32+
2233
var description: String {
2334
return "\(title) 여정"
2435
}

ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/JourneyListView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ extension JourneyListView {
165165
journeyList.forEach { journey in
166166
let journeyView = OneLineTextBoxView(
167167
title: journey.title + " 여정",
168-
tagTitle: journey.style?.title,
168+
tagTitle: journey.style?.tagTitle,
169169
tagType: isFinished ? .word3Gray : .word3Purple,
170170
isHighlighted: !isFinished
171171
)

ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/ViewController/MyPageViewController.swift

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ final class MyPageViewController: BaseViewController {
3838

3939
viewModel.action(.viewWillAppear)
4040
viewModel.action(.checkHasEnterMyPage)
41+
checkNotificationAuthorizationOnEnter()
4142
}
4243

4344
override func viewDidLoad() {
@@ -212,6 +213,24 @@ extension MyPageViewController {
212213

213214
extension MyPageViewController {
214215

216+
private func checkNotificationAuthorizationOnEnter() {
217+
UNUserNotificationCenter.current().getNotificationSettings { [weak self] settings in
218+
guard let self else { return }
219+
220+
let isAuthorized: Bool
221+
switch settings.authorizationStatus {
222+
case .authorized, .provisional, .ephemeral:
223+
isAuthorized = true
224+
default:
225+
isAuthorized = false
226+
}
227+
228+
DispatchQueue.main.async {
229+
self.rootView.featuresView.noticeView.noticeSwitch.setOn(isAuthorized, animated: false)
230+
}
231+
}
232+
}
233+
215234
@objc
216235
private func checkNoticeAuthorizationWhenBack() {
217236
guard didOpenSetting else { return }
@@ -285,13 +304,8 @@ extension MyPageViewController {
285304
switch settings.authorizationStatus {
286305
case .authorized, .provisional, .ephemeral:
287306
self.viewModel.action(.notificationSwitchDidTap)
288-
case .denied:
289-
self.presentMoveSettingAlert(
290-
isOn: sender.isOn,
291-
status: .denied
292-
)
293-
case .notDetermined:
294-
break
307+
case .denied, .notDetermined:
308+
self.presentMoveSettingAlert(isOn: sender.isOn, status: .authorized)
295309
@unknown default:
296310
break
297311
}

ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/CommonQuest/Cells/CommonQuestAnswerCell.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,6 @@ extension CommonQuestAnswerCell {
104104
) {
105105
if let profileIcon {
106106
userIconView.image = profileIcon
107-
} else {
108-
userIconView.do {
109-
$0.backgroundColor = .grayscale600
110-
$0.layer.cornerRadius = 10
111-
}
112107
}
113108
userNicknameLabel.text = answer.writer
114109
answerContentLabel.text = answer.content

ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/CommonQuest/DateNavigator.swift

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,17 @@ protocol DateNavigatorDelegate: AnyObject {
1313

1414
final class DateNavigator: UITableViewHeaderFooterView {
1515

16-
weak var delegate: DateNavigatorDelegate?
17-
1816
private let calendar = Calendar.current
1917
private let yesterday: Int = -1
20-
private let tommorw: Int = 1
18+
private let tommorow: Int = 1
2119
private let dateFormatter: DateFormatter = {
2220
let formatter = DateFormatter()
2321
formatter.dateFormat = "M월 d일"
2422
return formatter
2523
}()
24+
private let minDate: Date
25+
26+
weak var delegate: DateNavigatorDelegate?
2627

2728
private(set) var currentDate: Date = .now
2829
private let navigatorStackView = UIStackView()
@@ -31,6 +32,13 @@ final class DateNavigator: UITableViewHeaderFooterView {
3132
private(set) var nextButton = UIButton()
3233

3334
override init(reuseIdentifier: String?) {
35+
self.minDate = DateComponents(
36+
calendar: calendar,
37+
year: 2026,
38+
month: 3,
39+
day: 6
40+
).date ?? .now
41+
3442
super.init(reuseIdentifier: reuseIdentifier)
3543

3644
setStyle()
@@ -120,34 +128,49 @@ extension DateNavigator {
120128

121129
@objc
122130
private func moveYesterday() {
123-
currentDate = getDate(by: yesterday) ?? .now
124-
dateLabel.text = dateFormatter.string(from: currentDate)
125-
updateNextButton()
131+
guard !isMinDate else { return }
126132

127-
// TO-DO : 실제 날짜 형식으로 수정
128-
delegate?.dateDidChanged(to: currentDate)
133+
moveDay(to: yesterday)
129134
}
130135

131136
@objc
132137
private func moveTomorrow() {
133-
currentDate = getDate(by: tommorw) ?? .now
138+
moveDay(to: tommorow)
139+
}
140+
141+
private func moveDay(to day: Int) {
142+
currentDate = getDate(by: day) ?? .now
134143
dateLabel.text = dateFormatter.string(from: currentDate)
135-
updateNextButton()
136-
144+
updateButtons()
137145
delegate?.dateDidChanged(to: currentDate)
138146
}
139147

140148
private func getDate(by value: Int) -> Date? {
141149
calendar.date(byAdding: .day, value: value, to: currentDate)
142150
}
143151

152+
private func updateButtons() {
153+
updatePreviousButton()
154+
updateNextButton()
155+
}
156+
157+
private func updatePreviousButton() {
158+
let previousImage: UIImage = isMinDate ? .previousOff : .previousOn
159+
previousButton.setImage(previousImage, for: .normal)
160+
nextButton.isEnabled = !isMinDate
161+
}
162+
144163
private func updateNextButton() {
145-
let image: UIImage = isToday ? .nextOff : .nextOn
146-
nextButton.setImage(image, for: .normal)
164+
let nextImage: UIImage = isToday ? .nextOff : .nextOn
165+
nextButton.setImage(nextImage, for: .normal)
147166
nextButton.isEnabled = !isToday
148167
}
149168

150169
private var isToday: Bool {
151170
calendar.isDateInToday(currentDate)
152171
}
172+
173+
private var isMinDate: Bool {
174+
calendar.isDate(currentDate, inSameDayAs: minDate)
175+
}
153176
}

ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewModel/CommonQuestViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ extension CommonQuestViewModel: ViewModelType {
9292
extension CommonQuestViewModel {
9393

9494
private enum ProfileIcon: String, CaseIterable {
95-
case sad = "SAD"
95+
case sad = "SADNESS"
9696
case selfUnderstanding = "SELF_UNDERSTANDING"
9797
case soso = "SO_SO"
9898
case relieved = "RELIEVED"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "previous_off.svg",
5+
"idiom" : "universal",
6+
"scale" : "1x"
7+
},
8+
{
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"author" : "xcode",
19+
"version" : 1
20+
}
21+
}
Lines changed: 4 additions & 0 deletions
Loading

ByeBoo-iOS/fastlane/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do
1515

1616
## iOS
1717

18-
### ios beta
18+
### ios upload_testflight
1919

2020
```sh
21-
[bundle exec] fastlane ios beta
21+
[bundle exec] fastlane ios upload_testflight
2222
```
2323

2424
Push a new beta build to TestFlight

0 commit comments

Comments
 (0)