diff --git a/ByeBoo-iOS/ByeBoo-iOS.xcodeproj/project.pbxproj b/ByeBoo-iOS/ByeBoo-iOS.xcodeproj/project.pbxproj index 4fcdf4cf..7024ead0 100644 --- a/ByeBoo-iOS/ByeBoo-iOS.xcodeproj/project.pbxproj +++ b/ByeBoo-iOS/ByeBoo-iOS.xcodeproj/project.pbxproj @@ -307,7 +307,7 @@ CODE_SIGN_ENTITLEMENTS = "ByeBoo-iOS/ByeBoo-Dev.entitlements"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 6; + CURRENT_PROJECT_VERSION = 7; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = Z6682N5G5D; @@ -351,7 +351,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 6; + CURRENT_PROJECT_VERSION = 7; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = Z6682N5G5D; GENERATE_INFOPLIST_FILE = YES; @@ -512,7 +512,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 6; + CURRENT_PROJECT_VERSION = 7; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 18.2; MACOSX_DEPLOYMENT_TARGET = 15.2; @@ -534,7 +534,7 @@ buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 6; + CURRENT_PROJECT_VERSION = 7; GENERATE_INFOPLIST_FILE = YES; IPHONEOS_DEPLOYMENT_TARGET = 18.2; MACOSX_DEPLOYMENT_TARGET = 15.2; diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Enum/JourneyType+Presentation.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Enum/JourneyType+Presentation.swift index cfa7dadc..befc9b38 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Enum/JourneyType+Presentation.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Enum/JourneyType+Presentation.swift @@ -19,6 +19,17 @@ extension JourneyType { } } + var tagTitle: String { + switch self { + case .recording: + "이별" + case .active: + "행동형" + case .reunion: + "재회" + } + } + var description: String { return "\(title) 여정" } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/JourneyListView.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/JourneyListView.swift index 8444b34f..4d9109e5 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/JourneyListView.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/View/JourneyListView.swift @@ -165,7 +165,7 @@ extension JourneyListView { journeyList.forEach { journey in let journeyView = OneLineTextBoxView( title: journey.title + " 여정", - tagTitle: journey.style?.title, + tagTitle: journey.style?.tagTitle, tagType: isFinished ? .word3Gray : .word3Purple, isHighlighted: !isFinished ) diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/ViewController/MyPageViewController.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/ViewController/MyPageViewController.swift index 33730a2e..0880b1e3 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/ViewController/MyPageViewController.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/MyPage/ViewController/MyPageViewController.swift @@ -38,6 +38,7 @@ final class MyPageViewController: BaseViewController { viewModel.action(.viewWillAppear) viewModel.action(.checkHasEnterMyPage) + checkNotificationAuthorizationOnEnter() } override func viewDidLoad() { @@ -212,6 +213,24 @@ extension MyPageViewController { extension MyPageViewController { + private func checkNotificationAuthorizationOnEnter() { + UNUserNotificationCenter.current().getNotificationSettings { [weak self] settings in + guard let self else { return } + + let isAuthorized: Bool + switch settings.authorizationStatus { + case .authorized, .provisional, .ephemeral: + isAuthorized = true + default: + isAuthorized = false + } + + DispatchQueue.main.async { + self.rootView.featuresView.noticeView.noticeSwitch.setOn(isAuthorized, animated: false) + } + } + } + @objc private func checkNoticeAuthorizationWhenBack() { guard didOpenSetting else { return } @@ -285,13 +304,8 @@ extension MyPageViewController { switch settings.authorizationStatus { case .authorized, .provisional, .ephemeral: self.viewModel.action(.notificationSwitchDidTap) - case .denied: - self.presentMoveSettingAlert( - isOn: sender.isOn, - status: .denied - ) - case .notDetermined: - break + case .denied, .notDetermined: + self.presentMoveSettingAlert(isOn: sender.isOn, status: .authorized) @unknown default: break } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/CommonQuest/Cells/CommonQuestAnswerCell.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/CommonQuest/Cells/CommonQuestAnswerCell.swift index e885ec3f..37db9228 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/CommonQuest/Cells/CommonQuestAnswerCell.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/CommonQuest/Cells/CommonQuestAnswerCell.swift @@ -104,11 +104,6 @@ extension CommonQuestAnswerCell { ) { if let profileIcon { userIconView.image = profileIcon - } else { - userIconView.do { - $0.backgroundColor = .grayscale600 - $0.layer.cornerRadius = 10 - } } userNicknameLabel.text = answer.writer answerContentLabel.text = answer.content diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/CommonQuest/DateNavigator.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/CommonQuest/DateNavigator.swift index 9d6aee86..26bac27b 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/CommonQuest/DateNavigator.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/View/CommonQuest/DateNavigator.swift @@ -13,16 +13,17 @@ protocol DateNavigatorDelegate: AnyObject { final class DateNavigator: UITableViewHeaderFooterView { - weak var delegate: DateNavigatorDelegate? - private let calendar = Calendar.current private let yesterday: Int = -1 - private let tommorw: Int = 1 + private let tommorow: Int = 1 private let dateFormatter: DateFormatter = { let formatter = DateFormatter() formatter.dateFormat = "M월 d일" return formatter }() + private let minDate: Date + + weak var delegate: DateNavigatorDelegate? private(set) var currentDate: Date = .now private let navigatorStackView = UIStackView() @@ -31,6 +32,13 @@ final class DateNavigator: UITableViewHeaderFooterView { private(set) var nextButton = UIButton() override init(reuseIdentifier: String?) { + self.minDate = DateComponents( + calendar: calendar, + year: 2026, + month: 3, + day: 6 + ).date ?? .now + super.init(reuseIdentifier: reuseIdentifier) setStyle() @@ -120,20 +128,20 @@ extension DateNavigator { @objc private func moveYesterday() { - currentDate = getDate(by: yesterday) ?? .now - dateLabel.text = dateFormatter.string(from: currentDate) - updateNextButton() + guard !isMinDate else { return } - // TO-DO : 실제 날짜 형식으로 수정 - delegate?.dateDidChanged(to: currentDate) + moveDay(to: yesterday) } @objc private func moveTomorrow() { - currentDate = getDate(by: tommorw) ?? .now + moveDay(to: tommorow) + } + + private func moveDay(to day: Int) { + currentDate = getDate(by: day) ?? .now dateLabel.text = dateFormatter.string(from: currentDate) - updateNextButton() - + updateButtons() delegate?.dateDidChanged(to: currentDate) } @@ -141,13 +149,28 @@ extension DateNavigator { calendar.date(byAdding: .day, value: value, to: currentDate) } + private func updateButtons() { + updatePreviousButton() + updateNextButton() + } + + private func updatePreviousButton() { + let previousImage: UIImage = isMinDate ? .previousOff : .previousOn + previousButton.setImage(previousImage, for: .normal) + nextButton.isEnabled = !isMinDate + } + private func updateNextButton() { - let image: UIImage = isToday ? .nextOff : .nextOn - nextButton.setImage(image, for: .normal) + let nextImage: UIImage = isToday ? .nextOff : .nextOn + nextButton.setImage(nextImage, for: .normal) nextButton.isEnabled = !isToday } private var isToday: Bool { calendar.isDateInToday(currentDate) } + + private var isMinDate: Bool { + calendar.isDate(currentDate, inSameDayAs: minDate) + } } diff --git a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewModel/CommonQuestViewModel.swift b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewModel/CommonQuestViewModel.swift index 51f063e9..06b6f30f 100644 --- a/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewModel/CommonQuestViewModel.swift +++ b/ByeBoo-iOS/ByeBoo-iOS/Presentation/Feature/Quest/ViewModel/CommonQuestViewModel.swift @@ -92,7 +92,7 @@ extension CommonQuestViewModel: ViewModelType { extension CommonQuestViewModel { private enum ProfileIcon: String, CaseIterable { - case sad = "SAD" + case sad = "SADNESS" case selfUnderstanding = "SELF_UNDERSTANDING" case soso = "SO_SO" case relieved = "RELIEVED" diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/previous_off.imageset/Contents.json b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/previous_off.imageset/Contents.json new file mode 100644 index 00000000..31c4b879 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/previous_off.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "previous_off.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/previous_off.imageset/previous_off.svg b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/previous_off.imageset/previous_off.svg new file mode 100644 index 00000000..90c0c2e0 --- /dev/null +++ b/ByeBoo-iOS/ByeBoo-iOS/Resource/Assets.xcassets/IconSystem/previous_off.imageset/previous_off.svg @@ -0,0 +1,4 @@ + + + + diff --git a/ByeBoo-iOS/fastlane/README.md b/ByeBoo-iOS/fastlane/README.md index 891747df..d115df5a 100644 --- a/ByeBoo-iOS/fastlane/README.md +++ b/ByeBoo-iOS/fastlane/README.md @@ -15,10 +15,10 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do ## iOS -### ios beta +### ios upload_testflight ```sh -[bundle exec] fastlane ios beta +[bundle exec] fastlane ios upload_testflight ``` Push a new beta build to TestFlight