From ebb4bbbde038a2e30af61a6362abd5c699474dd9 Mon Sep 17 00:00:00 2001 From: kimscastle Date: Fri, 21 Jul 2023 16:18:42 +0900 Subject: [PATCH 01/18] =?UTF-8?q?[FIX]=20ArticleDetailView=20=EB=A0=88?= =?UTF-8?q?=EC=9D=B4=EC=95=84=EC=9B=83=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewControllers/ArticleDetailViewController.swift | 7 ++++++- .../ArticleDetail/Views/ArticleDetailTableView.swift | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/ViewControllers/ArticleDetailViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/ViewControllers/ArticleDetailViewController.swift index 7771c093..86d590da 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/ViewControllers/ArticleDetailViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/ViewControllers/ArticleDetailViewController.swift @@ -52,6 +52,7 @@ final class ArticleDetailViewController: UIViewController { public override func viewDidLoad() { super.viewDidLoad() + setUI() setHierarchy() setLayout() setTableView() @@ -121,6 +122,10 @@ extension ArticleDetailViewController: ViewControllerServiceable { private extension ArticleDetailViewController { + func setUI() { + view.backgroundColor = .designSystem(.background) + } + func setHierarchy() { view.addSubviews(navigationBar, articleTableView, progressBar, scrollToTopButton) } @@ -138,7 +143,7 @@ private extension ArticleDetailViewController { articleTableView.snp.makeConstraints { make in make.top.equalTo(progressBar.snp.bottom) make.leading.trailing.equalToSuperview() - make.bottom.equalTo(view.safeAreaLayoutGuide) + make.bottom.equalToSuperview() } scrollToTopButton.snp.makeConstraints { make in diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/Views/ArticleDetailTableView.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/Views/ArticleDetailTableView.swift index e13537c6..c44e41eb 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/Views/ArticleDetailTableView.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/Views/ArticleDetailTableView.swift @@ -21,7 +21,7 @@ class ArticleDetailTableView: UITableView { } private func setUI() { - self.backgroundColor = .designSystem(.black) + self.backgroundColor = .designSystem(.background) } private func setTableView() { From b62887ac5956e79e0da6813e151b14b61b82f4ad Mon Sep 17 00:00:00 2001 From: kimscastle Date: Fri, 21 Jul 2023 16:19:05 +0900 Subject: [PATCH 02/18] =?UTF-8?q?[FIX]=20=ED=83=90=EC=83=89=EC=84=B8?= =?UTF-8?q?=EB=B6=80=ED=8E=98=EC=9D=B4=EC=A7=80=EC=97=90=EC=84=9C=20Detail?= =?UTF-8?q?ViewController=EB=A1=9C=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ArticleListByCategoryViewController.swift | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift index 55cea18e..50a3e9cd 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift @@ -34,15 +34,9 @@ final class ArticleListByCategoryViewController: UIViewController { public override func viewDidLoad() { super.viewDidLoad() setUI() - setHierarchy() - setLayout() - - setAddTarget() - setDelegate() - setTableView() setNotificationCenter() } @@ -85,12 +79,9 @@ private extension ArticleListByCategoryViewController { } } - func setAddTarget() { - - } - func setDelegate() { articleListTableView.dataSource = self + articleListTableView.delegate = self } func setTableView() { @@ -150,3 +141,13 @@ extension ArticleListByCategoryViewController: UITableViewDataSource { return cell } } + +extension ArticleListByCategoryViewController: UITableViewDelegate { + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + let articleDetailViewController = ArticleDetailViewController() + articleDetailViewController.setArticleId(id: articleListData[indexPath.row].articleId) + articleDetailViewController.isModalInPresentation = true + articleDetailViewController.modalPresentationStyle = .overFullScreen + self.present(articleDetailViewController, animated: true) + } +} From cf6d8415fac59e8e71952b750f7b53ef2e6ab3f9 Mon Sep 17 00:00:00 2001 From: kimscastle Date: Fri, 21 Jul 2023 16:33:43 +0900 Subject: [PATCH 03/18] =?UTF-8?q?[FIX]=20=EC=95=84=ED=8B=B0=ED=81=B4?= =?UTF-8?q?=EB=94=94=ED=85=8C=EC=9D=BC=EB=B7=B0=20=ED=95=A8=EC=88=98?= =?UTF-8?q?=EB=A1=9C=EB=B9=BC=EA=B3=A0=20=EC=97=B0=EA=B2=B0(#114)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Global/Extensions/UIViewController+.swift | 19 +++++++++++++++++++ .../ArticleListByCategoryViewController.swift | 6 +----- .../CurriculumListByWeekViewController.swift | 6 +----- .../ViewControllers/TodayViewController.swift | 7 ++----- 4 files changed, 23 insertions(+), 15 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Global/Extensions/UIViewController+.swift b/LionHeart-iOS/LionHeart-iOS/Global/Extensions/UIViewController+.swift index efc22634..73e3be55 100644 --- a/LionHeart-iOS/LionHeart-iOS/Global/Extensions/UIViewController+.swift +++ b/LionHeart-iOS/LionHeart-iOS/Global/Extensions/UIViewController+.swift @@ -77,3 +77,22 @@ extension UIViewController { } } +/** + + - Description: + ArticleDetailViewController로 fullscreen으로 present해주는 메서드입니다 + + - parameters: + articleID를 넘겨줍니다 + +*/ + +extension UIViewController { + func presentArticleDetailFullScreen(articleID: Int) { + let articleDetailViewController = ArticleDetailViewController() + articleDetailViewController.setArticleId(id: articleID) + articleDetailViewController.isModalInPresentation = true + articleDetailViewController.modalPresentationStyle = .overFullScreen + self.present(articleDetailViewController, animated: true) + } +} diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift index 50a3e9cd..dea38493 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift @@ -144,10 +144,6 @@ extension ArticleListByCategoryViewController: UITableViewDataSource { extension ArticleListByCategoryViewController: UITableViewDelegate { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { - let articleDetailViewController = ArticleDetailViewController() - articleDetailViewController.setArticleId(id: articleListData[indexPath.row].articleId) - articleDetailViewController.isModalInPresentation = true - articleDetailViewController.modalPresentationStyle = .overFullScreen - self.present(articleDetailViewController, animated: true) + self.presentArticleDetailFullScreen(articleID: articleListData[indexPath.row].articleId) } } diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumListByWeekViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumListByWeekViewController.swift index 0f3620ef..cdee0451 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumListByWeekViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumListByWeekViewController.swift @@ -188,11 +188,7 @@ private extension CurriculumListByWeekViewController { @objc func didSelectTableVIewCell(notification: NSNotification) { guard let articleId = notification.object as? Int else { return } - - let articleDetailVC = ArticleDetailViewController() - articleDetailVC.setArticleId(id: articleId) - articleDetailVC.modalPresentationStyle = .overFullScreen - self.present(articleDetailVC, animated: true) + presentArticleDetailFullScreen(articleID: articleId) } diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Today/ViewControllers/TodayViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Today/ViewControllers/TodayViewController.swift index ed92e420..2e67eaea 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Today/ViewControllers/TodayViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Today/ViewControllers/TodayViewController.swift @@ -169,10 +169,7 @@ private extension TodayViewController { } @objc func articleTapped(_ sender: UIButton) { - let articleDetailViewController = ArticleDetailViewController() - articleDetailViewController.setArticleId(id: self.todayArticleID) - articleDetailViewController.isModalInPresentation = true - articleDetailViewController.modalPresentationStyle = .overFullScreen - self.present(articleDetailViewController, animated: true) + guard let todayArticleID else { return } + self.presentArticleDetailFullScreen(articleID: todayArticleID) } } From 6f56c8ba478417b741fd6ed82524e07560482968 Mon Sep 17 00:00:00 2001 From: kimscastle Date: Fri, 21 Jul 2023 16:36:45 +0900 Subject: [PATCH 04/18] =?UTF-8?q?[FIX]=20challenge=20=EB=84=A4=EB=B9=84?= =?UTF-8?q?=EB=B0=94=20button=20action=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewController/ChallengeViewController.swift | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Challenge/ViewController/ChallengeViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Challenge/ViewController/ChallengeViewController.swift index 30c0ae71..c89d4f87 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Challenge/ViewController/ChallengeViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Challenge/ViewController/ChallengeViewController.swift @@ -161,6 +161,7 @@ final class ChallengeViewController: UIViewController { setLayout() setNavigationBar() setDelegate() + setAddTarget() } override func viewDidAppear(_ animated: Bool) { @@ -243,6 +244,18 @@ private extension ChallengeViewController { make.leading.trailing.equalToSuperview() } } + + func setAddTarget() { + navigationBar.rightFirstBarItemAction { + let bookmarkViewController = BookmarkViewController() + self.navigationController?.pushViewController(bookmarkViewController, animated: true) + } + + navigationBar.rightSecondBarItemAction { + let myPageViewController = MyPageViewController() + self.navigationController?.pushViewController(myPageViewController, animated: true) + } + } } extension ChallengeViewController: From b5d46366c99ce5211812176f2f24013c9d5f1534 Mon Sep 17 00:00:00 2001 From: kimscastle Date: Fri, 21 Jul 2023 16:49:19 +0900 Subject: [PATCH 05/18] =?UTF-8?q?[FIX]=20ChallengeViewController=20loading?= =?UTF-8?q?view=EB=B0=8F=20error=20handling=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...heckCollectionViewCollectionViewCell.swift | 33 +------------------ .../ChallengeViewController.swift | 31 ++++++++++++++--- 2 files changed, 27 insertions(+), 37 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Challenge/Cells/ChallengeDayCheckCollectionViewCollectionViewCell.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Challenge/Cells/ChallengeDayCheckCollectionViewCollectionViewCell.swift index 4582473c..889a0ebd 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Challenge/Cells/ChallengeDayCheckCollectionViewCollectionViewCell.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Challenge/Cells/ChallengeDayCheckCollectionViewCollectionViewCell.swift @@ -12,23 +12,11 @@ import SnapKit final class ChallengeDayCheckCollectionViewCollectionViewCell: UICollectionViewCell, CollectionViewCellRegisterDequeueProtocol { - var textColorBool = false - - var inputData: DummyModel? { - didSet { - - } - } + var inputData: DummyModel? var inputString: String? { didSet { countLabel.text = inputString - - if textColorBool { - countLabel.textColor = .designSystem(.white) - } else { - countLabel.textColor = .designSystem(.gray600) - } } } @@ -48,20 +36,9 @@ final class ChallengeDayCheckCollectionViewCollectionViewCell: UICollectionViewC override init(frame: CGRect) { super.init(frame: frame) - // MARK: - 컴포넌트 설정 setUI() - - // MARK: - addsubView setHierarchy() - - // MARK: - autolayout설정 setLayout() - - // MARK: - button의 addtarget설정 - setAddTarget() - - // MARK: - delegate설정 - setDelegate() } @available(*, unavailable) @@ -90,12 +67,4 @@ private extension ChallengeDayCheckCollectionViewCollectionViewCell { make.height.equalTo(1) } } - - func setAddTarget() { - - } - - func setDelegate() { - - } } diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Challenge/ViewController/ChallengeViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Challenge/ViewController/ChallengeViewController.swift index c89d4f87..835e2682 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Challenge/ViewController/ChallengeViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Challenge/ViewController/ChallengeViewController.swift @@ -141,15 +141,17 @@ final class ChallengeViewController: UIViewController { override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) - Task { - do{ + do { + self.showLoading() let model = try await ChallengeService.shared.inquireChallengeInfo() self.inputData = model self.tags = model.daddyAttendances self.challengeDayCheckCollectionView.reloadData() + self.hideLoading() } catch { - print(error) + guard let error = error as? NetworkError else { return } + handleError(error) } } } @@ -288,12 +290,31 @@ extension ChallengeViewController: UICollectionViewDataSource { if indexPath.item < tags.count { cell.inputString = tags[indexPath.item] cell.backgroundColor = .designSystem(.background) - cell.textColorBool = true } else { cell.inputString = "\(indexPath.section + indexPath.row + 1)" cell.backgroundColor = .designSystem(.gray1000) - cell.textColorBool = false } return cell } } + +extension ChallengeViewController: ViewControllerServiceable { + func handleError(_ error: NetworkError) { + switch error { + case .urlEncodingError: + LHToast.show(message: "url인코딩에러") + case .jsonDecodingError: + LHToast.show(message: "챌린지Decode에러") + case .badCasting: + LHToast.show(message: "배드캐스팅") + case .fetchImageError: + LHToast.show(message: "챌린지 이미지 패치 에러") + case .unAuthorizedError: + LHToast.show(message: "챌린지 Auth 에러") + case .clientError(_, let message): + LHToast.show(message: message) + case .serverError: + LHToast.show(message: "서버문제!") + } + } +} From 76d1d6db6a885ede126f73eca1e698ee5edf22e5 Mon Sep 17 00:00:00 2001 From: cchanmi Date: Fri, 21 Jul 2023 16:54:04 +0900 Subject: [PATCH 06/18] =?UTF-8?q?[FIX]=20tableView=20Cell=20indexPath=20?= =?UTF-8?q?=EA=B3=A0=EC=A0=95=EA=B0=92=20=EC=98=A4=EB=8A=94=20=EC=9D=B4?= =?UTF-8?q?=EC=8A=88=20=ED=95=B4=EA=B2=B0=20=20(#112)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Cells/CurriculumArticleByWeekTableViewCell.swift | 11 +++++++---- .../CurriculumListByWeekCollectionViewCell.swift | 1 - 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekTableViewCell.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekTableViewCell.swift index dc140f05..82ea5791 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekTableViewCell.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekTableViewCell.swift @@ -13,8 +13,6 @@ import SnapKit final class CurriculumArticleByWeekTableViewCell: UITableViewCell, TableViewCellRegisterDequeueProtocol { - var isBookmarkedIndexPath: IndexPath? - var inputData: ArticleDataByWeek? { didSet { guard let inputData else { @@ -95,9 +93,9 @@ final class CurriculumArticleByWeekTableViewCell: UITableViewCell, TableViewCell button.setImage(ImageLiterals.BookMark.activeBookmarkSmall, for: .selected) button.addButtonAction { _ in - // VC로 넘기기 노티피케이션 + let indexPath = self.getIndexPath() NotificationCenter.default.post(name: NSNotification.Name("isArticleBookmarked"), - object: nil, userInfo: ["bookmarkCellIndexPath": self.isBookmarkedIndexPath?.row ?? 0, + object: nil, userInfo: ["bookmarkCellIndexPath": indexPath?.row ?? 0, "bookmarkButtonSelected": !button.isSelected]) button.isSelected.toggle() } @@ -182,4 +180,9 @@ private extension CurriculumArticleByWeekTableViewCell { $0.bottom.equalToSuperview().inset(10) } } + + func getIndexPath() -> IndexPath? { + guard let superView = self.superview as? UITableView else { return nil } + return superView.indexPath(for: self) + } } diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumListByWeekCollectionViewCell.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumListByWeekCollectionViewCell.swift index 9b475b2f..9229c45b 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumListByWeekCollectionViewCell.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumListByWeekCollectionViewCell.swift @@ -119,7 +119,6 @@ extension CurriculumListByWeekCollectionViewCell: UITableViewDataSource{ cell.inputData = inputData?.articleData[indexPath.row - 1] cell.selectionStyle = .none cell.backgroundColor = .designSystem(.background) - cell.isBookmarkedIndexPath = indexPath return cell } } From ff9d8697e6a65879ae4e367a8b5c57ef3cadb305 Mon Sep 17 00:00:00 2001 From: cchanmi Date: Fri, 21 Jul 2023 17:05:19 +0900 Subject: [PATCH 07/18] =?UTF-8?q?[FIX]=20=EC=95=84=ED=8B=B0=ED=81=B4=20?= =?UTF-8?q?=EC=83=81=EC=84=B8=EB=B7=B0=20=EC=9D=B4=EB=8F=99=20=EB=A7=88?= =?UTF-8?q?=ED=81=AC=20=EC=A3=BC=EC=84=9D=20=EC=B6=94=EA=B0=80=20(#112)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ArticleListByCategoryViewController.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift index 55cea18e..f47900ca 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift @@ -150,3 +150,9 @@ extension ArticleListByCategoryViewController: UITableViewDataSource { return cell } } + +extension ArticleListByCategoryViewController: UITableViewDelegate { + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + // MARK: cell 클릭시 아티클 상세뷰로 이동 + } +} From e5bbaa94be7722d15e0ff99c56f2c0621b842685 Mon Sep 17 00:00:00 2001 From: cchanmi Date: Fri, 21 Jul 2023 17:08:38 +0900 Subject: [PATCH 08/18] =?UTF-8?q?[FIX]=20=EB=B6=81=EB=A7=88=ED=81=AC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80,=20=ED=95=B4=EC=A0=9C=EC=8B=9C=20=ED=86=A0?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EB=A9=94=EC=8B=9C=EC=A7=80=20(#112)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewControllers/ArticleListByCategoryViewController.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift index f47900ca..3cdceb49 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift @@ -109,6 +109,7 @@ private extension ArticleListByCategoryViewController { try await BookmarkService.shared.postBookmark(BookmarkRequest(articleId: articleListData[indexPath].articleId, bookmarkStatus: buttonSelected)) + buttonSelected ? LHToast.show(message: "북마크에 추가되었습니다") : LHToast.show(message: "북마크에 해제되었습니다") } catch { guard let error = error as? NetworkError else { return } handleError(error) From 27037727ba3a562a54e6a9eb8ee1597d559e089a Mon Sep 17 00:00:00 2001 From: DongHyun Kim <113027703+bricksky@users.noreply.github.com> Date: Fri, 21 Jul 2023 17:17:52 +0900 Subject: [PATCH 09/18] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5693591f..bb255384 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@

## 🍎 LionHeart-iOS Developers - | | | | | + | | | | | :---------:|:----------:|:---------:|:---------:|:---------:| 김민재 | 김의성 | 김동현 | 곽성준 | 황찬미 | [ffalswo2](https://github.com/ffalswo2) | [kimscastle](https://github.com/kimscastle) | [BrickSky](https://github.com/BrickSky) | [sjk4618](https://github.com/sjk4618) |[cchanmi](https://github.com/cchanmi) | From 0d2b0fa171bbcccb752119714aafef46b1084c46 Mon Sep 17 00:00:00 2001 From: kimscastle Date: Fri, 21 Jul 2023 17:53:23 +0900 Subject: [PATCH 10/18] =?UTF-8?q?[FIX]=20=EC=BD=94=EB=93=9C=EC=A0=95?= =?UTF-8?q?=EB=A6=AC=20(#115)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Global/Extensions/UIView+.swift | 2 +- .../ArticleDetailViewController.swift | 5 +- .../ViewControllers/TodayViewController.swift | 52 ++++++++++--------- 3 files changed, 29 insertions(+), 30 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Global/Extensions/UIView+.swift b/LionHeart-iOS/LionHeart-iOS/Global/Extensions/UIView+.swift index df1cd046..6a4dbee7 100644 --- a/LionHeart-iOS/LionHeart-iOS/Global/Extensions/UIView+.swift +++ b/LionHeart-iOS/LionHeart-iOS/Global/Extensions/UIView+.swift @@ -35,7 +35,7 @@ extension UIView{ case horizontal } - func setGradient(firstColor: UIColor, secondColor: UIColor, axis: GradientAxis){ + func setGradient(firstColor: UIColor, secondColor: UIColor, axis: GradientAxis) { let gradient: CAGradientLayer = CAGradientLayer() gradient.colors = [firstColor.cgColor, secondColor.cgColor] if axis == .horizontal { diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/ViewControllers/ArticleDetailViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/ViewControllers/ArticleDetailViewController.swift index 86d590da..cffd55d7 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/ViewControllers/ArticleDetailViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleDetail/ViewControllers/ArticleDetailViewController.swift @@ -78,10 +78,7 @@ extension ArticleDetailViewController { private func getArticleDetail() { Task { do { - guard let articleId else { - return - - } + guard let articleId else { return } self.articleDatas = try await ArticleService.shared.getArticleDetail(articleId: articleId) } catch { guard let error = error as? NetworkError else { return } diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Today/ViewControllers/TodayViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Today/ViewControllers/TodayViewController.swift index 2e67eaea..d039d896 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Today/ViewControllers/TodayViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Today/ViewControllers/TodayViewController.swift @@ -56,29 +56,6 @@ final class TodayViewController: UIViewController { } } -// MARK: - 네트워킹 -extension TodayViewController: ViewControllerServiceable { - func handleError(_ error: NetworkError) { - switch error { - case .urlEncodingError: - LHToast.show(message: "URL인코딩오류입니다", isTabBar: true) - case .jsonDecodingError: - LHToast.show(message: "Json디코딩오류입니다", isTabBar: true) - case .badCasting: - LHToast.show(message: "배드퀘스트", isTabBar: true) - case .fetchImageError: - LHToast.show(message: "이미지패치실패", isTabBar: true) - case .unAuthorizedError: - guard let window = self.view.window else { return } - ViewControllerUtil.setRootViewController(window: window, viewController: SplashViewController(), withAnimation: false) - case .clientError(_, let message): - LHToast.show(message: message, isTabBar: true) - case .serverError: - LHToast.show(message: "승준이어딧니 내목소리들리니", isTabBar: true) - } - } -} - extension TodayViewController { func getInquireTodayArticle() { Task { @@ -89,7 +66,10 @@ extension TodayViewController { titleLabel.userNickName = responseArticle.fetalNickname mainArticleView.data = responseArticle todayArticleID = responseArticle.aticleID - hideLoading() + // MARK: - 추후에 디팀에서 그라데이션있는 이미지로 받아오기로함 + DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { + self.hideLoading() + } } catch { guard let error = error as? NetworkError else { return } handleError(error) @@ -112,7 +92,6 @@ private extension TodayViewController { func setHierarchy() { view.addSubviews(todayNavigationBar, seperateLine) view.addSubviews(titleLabel, subTitleLable, pointImage, mainArticleView) - } func setLayout() { @@ -173,3 +152,26 @@ private extension TodayViewController { self.presentArticleDetailFullScreen(articleID: todayArticleID) } } + +// MARK: - 네트워킹 +extension TodayViewController: ViewControllerServiceable { + func handleError(_ error: NetworkError) { + switch error { + case .urlEncodingError: + LHToast.show(message: "URL인코딩오류입니다", isTabBar: true) + case .jsonDecodingError: + LHToast.show(message: "Json디코딩오류입니다", isTabBar: true) + case .badCasting: + LHToast.show(message: "배드퀘스트", isTabBar: true) + case .fetchImageError: + LHToast.show(message: "이미지패치실패", isTabBar: true) + case .unAuthorizedError: + guard let window = self.view.window else { return } + ViewControllerUtil.setRootViewController(window: window, viewController: SplashViewController(), withAnimation: false) + case .clientError(_, let message): + LHToast.show(message: message, isTabBar: true) + case .serverError: + LHToast.show(message: "승준이어딧니 내목소리들리니", isTabBar: true) + } + } +} From ea69677295783b73263db6a3d0b8da01d94f0952 Mon Sep 17 00:00:00 2001 From: kimscastle Date: Fri, 21 Jul 2023 18:03:01 +0900 Subject: [PATCH 11/18] =?UTF-8?q?[FIX]=20rootview=20navigation=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EA=B0=90=EC=8B=B8=EA=B8=B0(#114)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LionHeart-iOS/Scenes/Splash/SplashViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Splash/SplashViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Splash/SplashViewController.swift index 89eb005f..66c24c19 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Splash/SplashViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Splash/SplashViewController.swift @@ -118,10 +118,10 @@ private extension SplashViewController { guard let token = UserDefaultsManager.tokenKey else { return } await logout(token: token) // LoginVC로 이동하기 - let loginVC = LoginViewController() + let loginVC = UINavigationController(rootViewController: LoginViewController()) setRootViewController(to: loginVC, animation: true) } else if code == NetworkErrorCode.unfoundUserErrorCode { - let loginVC = LoginViewController() + let loginVC = UINavigationController(rootViewController: LoginViewController()) setRootViewController(to: loginVC, animation: true) } default: From 5959373085bc84e32e92ebbde7001faea4ad128b Mon Sep 17 00:00:00 2001 From: cchanmi Date: Fri, 21 Jul 2023 18:10:52 +0900 Subject: [PATCH 12/18] =?UTF-8?q?[FIX]=20=EB=B6=81=EB=A7=88=ED=81=AC=20?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=20=EC=83=81=ED=83=9C=20=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=84=B0=20=EC=97=B0=EA=B2=B0=20(#112)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ArticleListByCategoryViewController.swift | 8 ++++++-- .../Cells/CurriculumArticleByWeekTableViewCell.swift | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift index 3cdceb49..a00651c3 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Article/ArticleListByCategory/ViewControllers/ArticleListByCategoryViewController.swift @@ -13,7 +13,11 @@ import SnapKit final class ArticleListByCategoryViewController: UIViewController { var categoryString = String() - var articleListData = [ArticleDataByWeek]() + var articleListData: [ArticleDataByWeek] = [] { + didSet { + articleListTableView.reloadData() + } + } private lazy var navigationBar = LHNavigationBarView(type: .exploreEachCategory, viewController: self) @@ -147,7 +151,7 @@ extension ArticleListByCategoryViewController: UITableViewDataSource { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = CurriculumArticleByWeekTableViewCell.dequeueReusableCell(to: articleListTableView) - cell.inputData = articleListData[indexPath.item] + cell.inputData = articleListData[indexPath.row] return cell } } diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekTableViewCell.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekTableViewCell.swift index 82ea5791..f02409cc 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekTableViewCell.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/Cells/CurriculumArticleByWeekTableViewCell.swift @@ -28,7 +28,7 @@ final class CurriculumArticleByWeekTableViewCell: UITableViewCell, TableViewCell articleContentLabel.text = inputData.articleContent articleContentLabel.lineBreakStrategy = .pushOut articleContentLabel.lineBreakMode = .byTruncatingTail - + bookMarkButton.isSelected = inputData.isArticleBookmarked } } From 97a7edb58d2602a3236c4c7cccf85bffde239c36 Mon Sep 17 00:00:00 2001 From: cchanmi Date: Fri, 21 Jul 2023 18:23:51 +0900 Subject: [PATCH 13/18] =?UTF-8?q?[FIX]=20=EC=BB=A4=EB=A6=AC=ED=81=98?= =?UTF-8?q?=EB=9F=BC=20indexPath=20error=20=EC=88=98=EC=A0=95=20(#112)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ViewControllers/CurriculumListByWeekViewController.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumListByWeekViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumListByWeekViewController.swift index 0f3620ef..51274c11 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumListByWeekViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Curriculum/ViewControllers/CurriculumListByWeekViewController.swift @@ -154,9 +154,10 @@ private extension CurriculumListByWeekViewController { guard let indexPath = notification.userInfo?["bookmarkCellIndexPath"] as? Int else { return } guard let buttonSelected = notification.userInfo?["bookmarkButtonSelected"] as? Bool else { return } guard let listByWeekDatas else { return } - try await BookmarkService.shared.postBookmark(BookmarkRequest(articleId: listByWeekDatas.articleData[indexPath].articleId, + try await BookmarkService.shared.postBookmark(BookmarkRequest(articleId: listByWeekDatas.articleData[indexPath-1].articleId, bookmarkStatus: buttonSelected)) hideLoading() + buttonSelected ? LHToast.show(message: "북마크가 추가되었습니다") : LHToast.show(message: "북마크가 해제되었습니다") } catch { guard let error = error as? NetworkError else { return } handleError(error) From 408b1923358504204975848cb3f120132496d26c Mon Sep 17 00:00:00 2001 From: cchanmi Date: Fri, 21 Jul 2023 18:24:57 +0900 Subject: [PATCH 14/18] =?UTF-8?q?[FIX]=20=EB=B6=81=EB=A7=88=ED=81=AC=20?= =?UTF-8?q?=EC=9D=B4=EB=AF=B8=EC=A7=80=20background=20color=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20(#112)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scenes/BookMark/Cells/BookmarkListCollectionViewCell.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/BookMark/Cells/BookmarkListCollectionViewCell.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/BookMark/Cells/BookmarkListCollectionViewCell.swift index b2b9a487..f0ace10d 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/BookMark/Cells/BookmarkListCollectionViewCell.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/BookMark/Cells/BookmarkListCollectionViewCell.swift @@ -35,7 +35,6 @@ final class BookmarkListCollectionViewCell: UICollectionViewCell, private let articleImageView: UIImageView = { let imageView = UIImageView() - imageView.backgroundColor = .yellow return imageView }() From c7f841a52148e4376da37b97af18a7cc9579442f Mon Sep 17 00:00:00 2001 From: kimscastle Date: Fri, 21 Jul 2023 19:06:12 +0900 Subject: [PATCH 15/18] =?UTF-8?q?[FIX]=20=EC=97=90=EB=9F=AC=EB=A9=94?= =?UTF-8?q?=EC=84=B8=EC=A7=80=20=EC=A0=84=EB=B6=80=20=ED=98=B8=EC=B6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scenes/Login/LoginViewController.swift | 37 ++++++++++++++++--- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Scenes/Login/LoginViewController.swift b/LionHeart-iOS/LionHeart-iOS/Scenes/Login/LoginViewController.swift index 4fcd3f00..918c5097 100644 --- a/LionHeart-iOS/LionHeart-iOS/Scenes/Login/LoginViewController.swift +++ b/LionHeart-iOS/LionHeart-iOS/Scenes/Login/LoginViewController.swift @@ -17,7 +17,10 @@ final class LoginViewController: UIViewController { private var kakaoAccessToken: String? { didSet { - guard let kakaoToken = self.kakaoAccessToken else { return } + guard let kakaoToken = self.kakaoAccessToken else { + LHToast.show(message: "카카오토큰 언래핑 실패 21") + return + } self.loginAPI(kakaoToken: kakaoToken) } } @@ -67,10 +70,12 @@ final class LoginViewController: UIViewController { extension LoginViewController: ViewControllerServiceable { func handleError(_ error: NetworkError) { + LHToast.show(message: error.description) switch error { case .clientError(let code, let message): print(code, message) if code == NetworkErrorCode.unfoundUserErrorCode { + LHToast.show(message: "코드 잘돌아감") self.moveUserToOnboardingViewController() } default: @@ -84,11 +89,15 @@ extension LoginViewController { Task { do { try await AuthService.shared.login(type: .kakao, kakaoToken: kakaoToken) - guard let window = self.view.window else { return } + guard let window = self.view.window else { + LHToast.show(message: "로그인api에서 window guard let 88") + return + } let mainTabbarViewController = TabBarViewController() ViewControllerUtil.setRootViewController(window: window, viewController: mainTabbarViewController, withAnimation: false) } catch { guard let error = error as? NetworkError else { + LHToast.show(message: "넷웤에러 95") return } handleError(error) @@ -144,9 +153,17 @@ private extension LoginViewController { private func loginKakaoWithApp() { UserApi.shared.loginWithKakaoTalk { oAuthToken, error in - guard error == nil else { return } + guard error == nil else { + LHToast.show(message: "카카오api에러 151") + return + + } print("Login with KAKAO App Success !!") - guard let oAuthToken = oAuthToken else { return } + guard let oAuthToken = oAuthToken else { + LHToast.show(message: "카카오api에러 157") + return + + } print(oAuthToken.accessToken) self.kakaoAccessToken = oAuthToken.accessToken } @@ -154,9 +171,17 @@ private extension LoginViewController { private func loginKakaoWithWeb() { UserApi.shared.loginWithKakaoAccount { oAuthToken, error in - guard error == nil else { return } + guard error == nil else { + LHToast.show(message: "카카오api에러 164") + return + + } print("Login with KAKAO Web Success !!") - guard let oAuthToken = oAuthToken else { return } + guard let oAuthToken = oAuthToken else { + LHToast.show(message: "카카오api에러 175") + return + + } print(oAuthToken.accessToken) self.kakaoAccessToken = oAuthToken.accessToken } From 6d06cea93010002f09d02f9fe3641ea18c2f3e14 Mon Sep 17 00:00:00 2001 From: kimscastle Date: Fri, 21 Jul 2023 19:16:41 +0900 Subject: [PATCH 16/18] =?UTF-8?q?[FIX]=20token=EC=A0=95=EB=B3=B4=20?= =?UTF-8?q?=ED=86=A0=EC=8A=A4=ED=8A=B8=EC=97=90=20=EB=84=A3=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LionHeart-iOS/Global/UIComponents/LHToast/LHToastView.swift | 2 +- LionHeart-iOS/LionHeart-iOS/Network/Services/AuthService.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Global/UIComponents/LHToast/LHToastView.swift b/LionHeart-iOS/LionHeart-iOS/Global/UIComponents/LHToast/LHToastView.swift index d010a5f1..8e5948ad 100644 --- a/LionHeart-iOS/LionHeart-iOS/Global/UIComponents/LHToast/LHToastView.swift +++ b/LionHeart-iOS/LionHeart-iOS/Global/UIComponents/LHToast/LHToastView.swift @@ -33,7 +33,7 @@ extension LHToastView { self.addSubview(messageLabel) self.snp.makeConstraints { make in - make.height.equalTo(50) + make.height.equalTo(700) } self.messageLabel.snp.makeConstraints { make in make.center.equalToSuperview() diff --git a/LionHeart-iOS/LionHeart-iOS/Network/Services/AuthService.swift b/LionHeart-iOS/LionHeart-iOS/Network/Services/AuthService.swift index 2ea78ae3..27b04a40 100644 --- a/LionHeart-iOS/LionHeart-iOS/Network/Services/AuthService.swift +++ b/LionHeart-iOS/LionHeart-iOS/Network/Services/AuthService.swift @@ -40,7 +40,7 @@ final class AuthService: Serviceable { func login(type: LoginType, kakaoToken: String) async throws { // 1. UserDefault에서 토큰 가져오기 guard let fcmToken = UserDefaultsManager.tokenKey?.fcmToken else { - throw NetworkError.clientError(code: "", message: "fcmToken이 없는데 왜 없죠") + throw NetworkError.clientError(code: "", message: UserDefaultsManager.tokenKey) } let loginRequest = LoginRequest(socialType: type.raw, token: kakaoToken, fcmToken: fcmToken) From ebec3ea9c8cd8af379c35eff95099a797d14c9ed Mon Sep 17 00:00:00 2001 From: kimscastle Date: Fri, 21 Jul 2023 19:29:25 +0900 Subject: [PATCH 17/18] =?UTF-8?q?[FIX]=20fcm=20=EC=98=B5=EC=85=94=EB=84=90?= =?UTF-8?q?=EB=A1=9C=20=EB=B0=9B=EC=95=84=EC=98=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LionHeart-iOS/LionHeart-iOS/Application/AppDelegate.swift | 2 +- .../LionHeart-iOS/Global/UserDefault/UserDefaultToken.swift | 2 +- LionHeart-iOS/LionHeart-iOS/Network/Services/AuthService.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Application/AppDelegate.swift b/LionHeart-iOS/LionHeart-iOS/Application/AppDelegate.swift index 50dfea1e..b5f06e5f 100644 --- a/LionHeart-iOS/LionHeart-iOS/Application/AppDelegate.swift +++ b/LionHeart-iOS/LionHeart-iOS/Application/AppDelegate.swift @@ -59,7 +59,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { extension AppDelegate: MessagingDelegate { func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) { - guard let fcmToken else { return } +// guard let fcmToken else { return } print("✅✅✅✅✅✅✅✅✅✅✅✅✅fcmToken받아오기 성공✅✅✅✅✅✅✅✅✅✅✅✅✅✅") print("fcmToken: ", fcmToken) diff --git a/LionHeart-iOS/LionHeart-iOS/Global/UserDefault/UserDefaultToken.swift b/LionHeart-iOS/LionHeart-iOS/Global/UserDefault/UserDefaultToken.swift index b0267a6c..05161160 100644 --- a/LionHeart-iOS/LionHeart-iOS/Global/UserDefault/UserDefaultToken.swift +++ b/LionHeart-iOS/LionHeart-iOS/Global/UserDefault/UserDefaultToken.swift @@ -11,7 +11,7 @@ import Foundation struct UserDefaultToken: AppData, Codable { var refreshToken: String? var accessToken: String? - let fcmToken: String + let fcmToken: String? var isExistJWT: Bool { return !(self.refreshToken == nil) diff --git a/LionHeart-iOS/LionHeart-iOS/Network/Services/AuthService.swift b/LionHeart-iOS/LionHeart-iOS/Network/Services/AuthService.swift index 27b04a40..6d095700 100644 --- a/LionHeart-iOS/LionHeart-iOS/Network/Services/AuthService.swift +++ b/LionHeart-iOS/LionHeart-iOS/Network/Services/AuthService.swift @@ -40,7 +40,7 @@ final class AuthService: Serviceable { func login(type: LoginType, kakaoToken: String) async throws { // 1. UserDefault에서 토큰 가져오기 guard let fcmToken = UserDefaultsManager.tokenKey?.fcmToken else { - throw NetworkError.clientError(code: "", message: UserDefaultsManager.tokenKey) + throw NetworkError.clientError(code: "", message: "\(UserDefaultsManager.tokenKey)") } let loginRequest = LoginRequest(socialType: type.raw, token: kakaoToken, fcmToken: fcmToken) From ff7b89317008e480845e9cd0f44f6742692bdf0a Mon Sep 17 00:00:00 2001 From: kimscastle Date: Fri, 21 Jul 2023 23:15:10 +0900 Subject: [PATCH 18/18] =?UTF-8?q?[FIX]=20=ED=86=A0=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EB=86=92=EC=9D=B4=20=EC=9E=AC=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LionHeart-iOS/LionHeart-iOS/Application/AppDelegate.swift | 2 +- .../LionHeart-iOS/Global/UIComponents/LHToast/LHToastView.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LionHeart-iOS/LionHeart-iOS/Application/AppDelegate.swift b/LionHeart-iOS/LionHeart-iOS/Application/AppDelegate.swift index b5f06e5f..50dfea1e 100644 --- a/LionHeart-iOS/LionHeart-iOS/Application/AppDelegate.swift +++ b/LionHeart-iOS/LionHeart-iOS/Application/AppDelegate.swift @@ -59,7 +59,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { extension AppDelegate: MessagingDelegate { func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) { -// guard let fcmToken else { return } + guard let fcmToken else { return } print("✅✅✅✅✅✅✅✅✅✅✅✅✅fcmToken받아오기 성공✅✅✅✅✅✅✅✅✅✅✅✅✅✅") print("fcmToken: ", fcmToken) diff --git a/LionHeart-iOS/LionHeart-iOS/Global/UIComponents/LHToast/LHToastView.swift b/LionHeart-iOS/LionHeart-iOS/Global/UIComponents/LHToast/LHToastView.swift index 8e5948ad..d010a5f1 100644 --- a/LionHeart-iOS/LionHeart-iOS/Global/UIComponents/LHToast/LHToastView.swift +++ b/LionHeart-iOS/LionHeart-iOS/Global/UIComponents/LHToast/LHToastView.swift @@ -33,7 +33,7 @@ extension LHToastView { self.addSubview(messageLabel) self.snp.makeConstraints { make in - make.height.equalTo(700) + make.height.equalTo(50) } self.messageLabel.snp.makeConstraints { make in make.center.equalToSuperview()