From 56049f00e1d7e13946095c62dbe10377670f5d9a Mon Sep 17 00:00:00 2001 From: Sejin Lee Date: Fri, 5 May 2023 23:36:02 +0900 Subject: [PATCH 01/14] =?UTF-8?q?[Feat]=20#132=20-=20=EC=BD=94=EC=8A=A4=20?= =?UTF-8?q?=EA=B7=B8=EB=A6=AC=EA=B8=B0,=20=EB=8B=AC=EB=A6=AC=EA=B8=B0?= =?UTF-8?q?=EC=97=90=EC=84=9C=20UI=20=EC=88=98=EC=A0=95=20=EC=82=AC?= =?UTF-8?q?=ED=95=AD=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Global/UIComponents/CustomAlertVC.swift | 5 +++-- .../Runnect-iOS/Global/Utils/Toast.swift | 19 +++++++++++-------- .../CourseDrawing/VC/CourseDrawingVC.swift | 2 +- .../Running/VC/RunTrackingVC.swift | 11 +---------- .../Running/VC/RunningRecordVC.swift | 2 ++ 5 files changed, 18 insertions(+), 21 deletions(-) diff --git a/Runnect-iOS/Runnect-iOS/Global/UIComponents/CustomAlertVC.swift b/Runnect-iOS/Runnect-iOS/Global/UIComponents/CustomAlertVC.swift index 96ff2f46..1c18ecdd 100644 --- a/Runnect-iOS/Runnect-iOS/Global/UIComponents/CustomAlertVC.swift +++ b/Runnect-iOS/Runnect-iOS/Global/UIComponents/CustomAlertVC.swift @@ -30,11 +30,12 @@ final class CustomAlertVC: UIViewController { private let alertImageView = UIImageView().then { $0.image = ImageLiterals.imgPaper } - private let contentsLabel = UILabel().then { - $0.text = "코스를 만들었어요!" + private let contentsLabel: UILabel = UILabel().then { + $0.text = "코스를 만들었어요!\n지정한 코스는 보관함에서 볼 수 있어요." $0.font = .h5 $0.textColor = .g2 $0.textAlignment = .center + $0.numberOfLines = 2 } private let leftButton = CustomButton(title: "보관함 가기") diff --git a/Runnect-iOS/Runnect-iOS/Global/Utils/Toast.swift b/Runnect-iOS/Runnect-iOS/Global/Utils/Toast.swift index 1bed8bfa..0ff39dea 100644 --- a/Runnect-iOS/Runnect-iOS/Global/Utils/Toast.swift +++ b/Runnect-iOS/Runnect-iOS/Global/Utils/Toast.swift @@ -25,13 +25,14 @@ public class Toast { let toastContainer = UIView() let toastLabel = UILabel() - toastContainer.backgroundColor = .lightGray - toastContainer.alpha = 1 - toastContainer.layer.cornerRadius = 9 + toastContainer.backgroundColor = UIColor.g2.withAlphaComponent(0.8) + toastContainer.alpha = 1.0 + toastContainer.layer.cornerRadius = 20 toastContainer.clipsToBounds = true toastContainer.isUserInteractionEnabled = false - toastLabel.textColor = .white + toastLabel.textColor = .m4 + toastLabel.font = .b4 toastLabel.textAlignment = .center toastLabel.text = message toastLabel.clipsToBounds = true @@ -41,10 +42,12 @@ public class Toast { toastContainer.addSubview(toastLabel) view.addSubview(toastContainer) + let toastConatinerWidth = toastLabel.intrinsicContentSize.width + 40.0 + toastContainer.snp.makeConstraints { $0.centerX.equalToSuperview() - $0.bottom.equalToSuperview().inset(safeAreaBottomInset+80) - $0.width.equalTo(200) + $0.bottom.equalToSuperview().inset(safeAreaBottomInset+160) + $0.width.equalTo(toastConatinerWidth) $0.height.equalTo(44) } @@ -52,10 +55,10 @@ public class Toast { $0.center.equalToSuperview() } - UIView.animate(withDuration: 0.4, delay: 0.0, options: .curveEaseIn, animations: { + UIView.animate(withDuration: 1.0, delay: 0.0, options: .curveEaseIn, animations: { toastContainer.alpha = 1.0 }, completion: { _ in - UIView.animate(withDuration: 0.4, delay: 1.0, options: .curveEaseOut, animations: { + UIView.animate(withDuration: 1.0, delay: 2.0, options: .curveEaseOut, animations: { toastContainer.alpha = 0.0 }, completion: {_ in toastContainer.removeFromSuperview() diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingVC.swift index a6e2456c..7b0c72cb 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingVC.swift @@ -38,7 +38,7 @@ final class CourseDrawingVC: UIViewController { $0.alpha = 0 } - private let guideView = GuideView(title: "지점과 지점을 연결해 코스를 완성하세요!") + private let guideView = GuideView(title: "지도를 눌러 코스를 그려주세요") private lazy var naviBarContainerStackView = UIStackView( arrangedSubviews: [notchCoverView, naviBar] diff --git a/Runnect-iOS/Runnect-iOS/Presentation/Running/VC/RunTrackingVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/Running/VC/RunTrackingVC.swift index 0a50d010..3c69b581 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/Running/VC/RunTrackingVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/Running/VC/RunTrackingVC.swift @@ -203,16 +203,7 @@ extension RunTrackingVC { @objc private func runningCompleteButtonDidTap() { stopwatch.isRunning.toggle() - let bottomSheetVC = CustomBottomSheetVC() - bottomSheetVC.modalPresentationStyle = .overFullScreen - - bottomSheetVC.completeButtonTapped.sink { [weak self] _ in - guard let self = self else { return } - self.pushToRunningRecordVC() - bottomSheetVC.dismiss(animated: true) - }.store(in: cancelBag) - - self.present(bottomSheetVC, animated: true) + self.pushToRunningRecordVC() } } diff --git a/Runnect-iOS/Runnect-iOS/Presentation/Running/VC/RunningRecordVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/Running/VC/RunningRecordVC.swift index 108df439..3cabf2c6 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/Running/VC/RunningRecordVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/Running/VC/RunningRecordVC.swift @@ -305,6 +305,8 @@ extension RunningRecordVC { case .success(let result): let status = result.statusCode if 200..<300 ~= status { + let window = self.view.window! + Toast.show(message: "저장한 러닝 기록은 마이페이지에서 볼 수 있어요.", view: window, safeAreaBottomInset: self.safeAreaBottomInset()) self.navigationController?.popToRootViewController(animated: true) } if status >= 400 { From 0485de897276ef4e8e48846137046a5551c5c1c4 Mon Sep 17 00:00:00 2001 From: Sejin Lee Date: Mon, 8 May 2023 23:24:49 +0900 Subject: [PATCH 02/14] =?UTF-8?q?[Feat]=20#132=20-=20=EB=B0=A9=EB=AC=B8?= =?UTF-8?q?=EC=9E=90=20=ED=94=8C=EB=A1=9C=EC=9A=B0=20=EC=B2=98=EB=A6=AC?= =?UTF-8?q?=EB=A5=BC=20=EC=9C=84=ED=95=9C=20UserType=20=EC=97=B4=EA=B1=B0?= =?UTF-8?q?=ED=98=95=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Global/Extension/UIKit+/UIViewController+.swift | 8 ++++++++ .../Runnect-iOS/Global/Utils/RNUtils/UserManager.swift | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIViewController+.swift b/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIViewController+.swift index e1174385..7969b548 100644 --- a/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIViewController+.swift +++ b/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIViewController+.swift @@ -29,4 +29,12 @@ extension UIViewController { func hideTabBar(wantsToHide: Bool) { self.tabBarController?.tabBar.isHidden = wantsToHide } + + /// 인증 과정을 다시 거치도록 SplashVC로 보내기 + private func showSplashVC() { + let splashVC = SplashVC() + let navigationController = UINavigationController(rootViewController: splashVC) + guard let window = self.view.window else { return } + ViewControllerUtils.setRootViewController(window: window, viewController: navigationController, withAnimation: true) + } } diff --git a/Runnect-iOS/Runnect-iOS/Global/Utils/RNUtils/UserManager.swift b/Runnect-iOS/Runnect-iOS/Global/Utils/RNUtils/UserManager.swift index 604ce2c2..001085f8 100644 --- a/Runnect-iOS/Runnect-iOS/Global/Utils/RNUtils/UserManager.swift +++ b/Runnect-iOS/Runnect-iOS/Global/Utils/RNUtils/UserManager.swift @@ -14,6 +14,11 @@ enum RNError: Error { case etc } +enum UserType { + case visitor + case registered +} + final class UserManager { static let shared = UserManager() @@ -23,6 +28,7 @@ final class UserManager { @UserDefaultWrapper(key: "refreshToken") public var refreshToken @UserDefaultWrapper(key: "isKakao") public var isKakao var hasAccessToken: Bool { return self.accessToken != nil } + var userType: UserType = .visitor private init() {} From 1874d4603cac3347a46214669bed453c4bcc6b36 Mon Sep 17 00:00:00 2001 From: Sejin Lee Date: Mon, 8 May 2023 23:33:05 +0900 Subject: [PATCH 03/14] =?UTF-8?q?[Feat]=20#132=20-=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=9D=B8=20=EB=B7=B0=EC=97=90=20=EB=B0=A9=EB=AC=B8=EC=9E=90=20?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SignIn/VC/SignInSocialLoginVC.swift | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Runnect-iOS/Runnect-iOS/Presentation/SignIn/VC/SignInSocialLoginVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/SignIn/VC/SignInSocialLoginVC.swift index 5509f4c9..eb3af0a0 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/SignIn/VC/SignInSocialLoginVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/SignIn/VC/SignInSocialLoginVC.swift @@ -43,6 +43,12 @@ final class SignInSocialLoginVC: UIViewController { $0.setImage(ImageLiterals.imgKakaoLogin, for: .normal) } + private let visitorButton: UIButton = UIButton(type: .custom).then { + let attributedString = NSAttributedString(string: "회원가입 없이 둘러보기", attributes: [.underlineStyle: NSUnderlineStyle.single.rawValue, .font: UIFont.b2, .foregroundColor: UIColor.white]) + + $0.setAttributedTitle(attributedString, for: .normal) + } + override func viewDidLoad() { super.viewDidLoad() setUI() @@ -146,7 +152,7 @@ extension SignInSocialLoginVC { } private func setLayout() { - view.addSubviews(backgroundImageView, logoImageView, kakaoLoginButton, appleLoginButton) + view.addSubviews(backgroundImageView, logoImageView, kakaoLoginButton, appleLoginButton, visitorButton) backgroundImageView.snp.makeConstraints { make in make.edges.equalToSuperview() @@ -156,8 +162,15 @@ extension SignInSocialLoginVC { make.center.equalTo(view.safeAreaLayoutGuide) } + visitorButton.snp.makeConstraints { make in + make.bottom.equalTo(view.safeAreaLayoutGuide).inset(23) + make.height.equalTo(38) + make.width.equalTo(158) + make.centerX.equalToSuperview() + } + kakaoLoginButton.snp.makeConstraints { make in - make.bottom.equalToSuperview().inset(54) + make.bottom.equalTo(visitorButton.snp.top).offset(-10) make.height.equalTo(55) make.leading.trailing.equalToSuperview().inset(15) } From 670f132bd9decd351079130b182ae7e2f263348e Mon Sep 17 00:00:00 2001 From: Sejin Lee Date: Tue, 9 May 2023 00:07:34 +0900 Subject: [PATCH 04/14] =?UTF-8?q?[Feat]=20#132=20-=20=EB=B0=A9=EB=AC=B8?= =?UTF-8?q?=EC=9E=90=EC=9A=A9=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=9A=94?= =?UTF-8?q?=EC=B2=AD=20AlertVC=EB=A5=BC=20=EB=B3=B4=EC=97=AC=EC=A3=BC?= =?UTF-8?q?=EB=8A=94=20=ED=95=A8=EC=88=98=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Extension/UIKit+/UIViewController+.swift | 18 ++++++++++++- .../Global/UIComponents/CustomAlertVC.swift | 26 +++++++++++++++++++ .../Global/Utils/RNUtils/UserManager.swift | 2 +- .../MyPage/VC/SettingVC/PersonalInfoVC.swift | 7 ----- .../SignIn/VC/SignInSocialLoginVC.swift | 10 +++++-- 5 files changed, 52 insertions(+), 11 deletions(-) diff --git a/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIViewController+.swift b/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIViewController+.swift index 7969b548..0a3f485e 100644 --- a/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIViewController+.swift +++ b/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIViewController+.swift @@ -31,10 +31,26 @@ extension UIViewController { } /// 인증 과정을 다시 거치도록 SplashVC로 보내기 - private func showSplashVC() { + func showSplashVC() { let splashVC = SplashVC() let navigationController = UINavigationController(rootViewController: splashVC) guard let window = self.view.window else { return } ViewControllerUtils.setRootViewController(window: window, viewController: navigationController, withAnimation: true) } + + func presentSignInRequestAlertVC() { + let alertVC = CustomAlertVC() + .setTitle("가입 후 로그인 시 코스를 저장하고 달릴 수 있어요!") + .setLeftButtonTitle(NSAttributedString(string: "닫기", attributes: [.font: UIFont.h5, .foregroundColor: UIColor.m1])) + .setRightButtonTitle(NSAttributedString(string: "가입하기", attributes: [.font: UIFont.h5, .foregroundColor: UIColor.w1])) + alertVC.modalPresentationStyle = .overFullScreen + + alertVC.leftButtonTapAction = { + print("dsf") + alertVC.dismiss(animated: false) + } + + self.present(alertVC, animated: false) + alertVC.setImage(ImageLiterals.imgSpaceship, size: CGSize(width: 229, height: 136)) + } } diff --git a/Runnect-iOS/Runnect-iOS/Global/UIComponents/CustomAlertVC.swift b/Runnect-iOS/Runnect-iOS/Global/UIComponents/CustomAlertVC.swift index 1c18ecdd..4fd70b1d 100644 --- a/Runnect-iOS/Runnect-iOS/Global/UIComponents/CustomAlertVC.swift +++ b/Runnect-iOS/Runnect-iOS/Global/UIComponents/CustomAlertVC.swift @@ -24,6 +24,11 @@ final class CustomAlertVC: UIViewController { .asDriver() } + var leftButtonTapAction: (() -> Void)? + var rightButtonTapAction: (() -> Void)? + + private var cancelBag = CancelBag() + // MARK: - UI Components private let alertView = UIView() @@ -55,12 +60,22 @@ final class CustomAlertVC: UIViewController { super.viewDidLoad() self.setUI() self.setLayout() + self.bindViews() } } // MARK: - Methods extension CustomAlertVC { + /// 이미지 변경 + public func setImage(_ image: UIImage, size: CGSize) { + self.alertImageView.image = image + self.alertImageView.snp.updateConstraints { make in + make.width.equalTo(size.width) + make.height.equalTo(size.height) + } + } + /// conentsLabel의 텍스트 변경 @discardableResult public func setTitle(_ title: String) -> Self { @@ -81,6 +96,16 @@ extension CustomAlertVC { self.rightButton.changeTitle(attributedString: title) return self } + + private func bindViews() { + self.leftButtonTapped.sink { _ in + self.leftButtonTapAction?() + }.store(in: cancelBag) + + self.rightButtonTapped.sink { _ in + self.rightButtonTapAction?() + }.store(in: cancelBag) + } } // MARK: - UI & Layout @@ -110,6 +135,7 @@ extension CustomAlertVC { contentsLabel.snp.makeConstraints { make in make.top.equalTo(alertImageView.snp.bottom).offset(24) + make.leading.trailing.equalToSuperview().inset(10) make.centerX.equalToSuperview() } diff --git a/Runnect-iOS/Runnect-iOS/Global/Utils/RNUtils/UserManager.swift b/Runnect-iOS/Runnect-iOS/Global/Utils/RNUtils/UserManager.swift index 001085f8..303240ec 100644 --- a/Runnect-iOS/Runnect-iOS/Global/Utils/RNUtils/UserManager.swift +++ b/Runnect-iOS/Runnect-iOS/Global/Utils/RNUtils/UserManager.swift @@ -28,7 +28,7 @@ final class UserManager { @UserDefaultWrapper(key: "refreshToken") public var refreshToken @UserDefaultWrapper(key: "isKakao") public var isKakao var hasAccessToken: Bool { return self.accessToken != nil } - var userType: UserType = .visitor + var userType: UserType = .registered private init() {} diff --git a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/SettingVC/PersonalInfoVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/SettingVC/PersonalInfoVC.swift index 85066225..d2d97482 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/SettingVC/PersonalInfoVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/SettingVC/PersonalInfoVC.swift @@ -135,13 +135,6 @@ extension PersonalInfoVC { self.logout() } - private func showSplashVC() { - let splashVC = SplashVC() - let navigationController = UINavigationController(rootViewController: splashVC) - guard let window = self.view.window else { return } - ViewControllerUtils.setRootViewController(window: window, viewController: navigationController, withAnimation: true) - } - private func requestAppleToken() { let appleIDProvider = ASAuthorizationAppleIDProvider() let request = appleIDProvider.createRequest() diff --git a/Runnect-iOS/Runnect-iOS/Presentation/SignIn/VC/SignInSocialLoginVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/SignIn/VC/SignInSocialLoginVC.swift index eb3af0a0..fa94ab0d 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/SignIn/VC/SignInSocialLoginVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/SignIn/VC/SignInSocialLoginVC.swift @@ -61,7 +61,7 @@ final class SignInSocialLoginVC: UIViewController { // MARK: - @objc Function extension SignInSocialLoginVC { - @objc func touchUpAppleLoginButton() { + @objc func appleLoginButtonDidTap() { pushToAppleLogin() } @@ -118,14 +118,20 @@ extension SignInSocialLoginVC { } } } + + @objc private func visitorButtonDidTap() { + UserManager.shared.userType = .visitor + pushToTabBarController() + } } // MARK: - Methods extension SignInSocialLoginVC { private func setAddTarget() { - self.appleLoginButton.addTarget(self, action: #selector(touchUpAppleLoginButton), for: .touchUpInside) + self.appleLoginButton.addTarget(self, action: #selector(appleLoginButtonDidTap), for: .touchUpInside) self.kakaoLoginButton.addTarget(self, action: #selector(kakaoLoginButtonDidTap), for: .touchUpInside) + self.visitorButton.addTarget(self, action: #selector(visitorButtonDidTap), for: .touchUpInside) } private func pushToNickNameSetUpVC() { From 44a2041f3e1f62af4f105b3abf93343af101710c Mon Sep 17 00:00:00 2001 From: Sejin Lee Date: Tue, 9 May 2023 10:12:53 +0900 Subject: [PATCH 05/14] =?UTF-8?q?[Feat]=20#132=20-=20=EC=BD=94=EC=8A=A4=20?= =?UTF-8?q?=EA=B7=B8=EB=A6=AC=EA=B8=B0=20=EB=B0=A9=EB=AC=B8=EC=9E=90=20?= =?UTF-8?q?=ED=95=B8=EB=93=A4=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Global/Extension/UIKit+/UIViewController+.swift | 11 ++++++++++- .../CourseDrawing/VC/CourseDrawingVC.swift | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIViewController+.swift b/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIViewController+.swift index 0a3f485e..35171bba 100644 --- a/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIViewController+.swift +++ b/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIViewController+.swift @@ -46,11 +46,20 @@ extension UIViewController { alertVC.modalPresentationStyle = .overFullScreen alertVC.leftButtonTapAction = { - print("dsf") alertVC.dismiss(animated: false) } + alertVC.rightButtonTapAction = { + self.showSplashVC() + } + self.present(alertVC, animated: false) alertVC.setImage(ImageLiterals.imgSpaceship, size: CGSize(width: 229, height: 136)) } + + func handleVisitor() -> Bool { + guard UserManager.shared.userType == .visitor else { return true } + self.presentSignInRequestAlertVC() + return false + } } diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingVC.swift index 7b0c72cb..2f1d6cb9 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingVC.swift @@ -200,6 +200,7 @@ extension CourseDrawingVC { } @objc private func completeButtonDidTap() { + guard handleVisitor() else { return } mapView.capturePathImage() } } From b4c750ce637103cbf8ae2efb9358460ab0b3daee Mon Sep 17 00:00:00 2001 From: Sejin Lee Date: Tue, 9 May 2023 23:16:14 +0900 Subject: [PATCH 06/14] =?UTF-8?q?[Feat]=20#132=20-=20=EB=B3=B4=EA=B4=80?= =?UTF-8?q?=ED=95=A8,=20=EB=A7=88=EC=9D=B4=ED=8E=98=EC=9D=B4=EC=A7=80=20?= =?UTF-8?q?=EB=B7=B0=20=EB=B0=A9=EB=AC=B8=EC=9E=90=20UI=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Extension/UIKit+/UIViewController+.swift | 17 +++++++++++++++++ .../Global/UIComponents/ListEmptyView.swift | 11 +++++++++++ .../Global/Utils/RNUtils/UserManager.swift | 1 + .../CourseStorage/VC/CourseStorageVC.swift | 10 +++++++++- .../Presentation/MyPage/VC/MyPageVC.swift | 7 ++++++- 5 files changed, 44 insertions(+), 2 deletions(-) diff --git a/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIViewController+.swift b/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIViewController+.swift index 35171bba..3cd7bf78 100644 --- a/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIViewController+.swift +++ b/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIViewController+.swift @@ -62,4 +62,21 @@ extension UIViewController { self.presentSignInRequestAlertVC() return false } + + func showSignInRequestEmptyView() { + let emptyView = ListEmptyView(description: "러넥트에 가입하면 내가 그린 코스와\n 스크랩 코스를 관리할 수 있어요!", + buttonTitle: "가입하기") + emptyView.buttonTapAction = { + self.showSplashVC() + } + + emptyView.setImage(ImageLiterals.imgSpaceship, size: CGSize(width: 229, height: 136)) + + self.view.addSubview(emptyView) + + emptyView.snp.makeConstraints { make in + make.center.equalTo(view.safeAreaLayoutGuide) + make.leading.trailing.equalTo(view.safeAreaLayoutGuide).inset(80) + } + } } diff --git a/Runnect-iOS/Runnect-iOS/Global/UIComponents/ListEmptyView.swift b/Runnect-iOS/Runnect-iOS/Global/UIComponents/ListEmptyView.swift index d6a039d5..82347cad 100644 --- a/Runnect-iOS/Runnect-iOS/Global/UIComponents/ListEmptyView.swift +++ b/Runnect-iOS/Runnect-iOS/Global/UIComponents/ListEmptyView.swift @@ -17,6 +17,8 @@ final class ListEmptyView: UIView { weak var delegate: ListEmptyViewDelegate? + var buttonTapAction: (() -> Void)? + // MARK: - UI Components private let mainImageView = UIImageView().then { @@ -61,6 +63,14 @@ extension ListEmptyView { private func setAddTarget() { bottomButton.addTarget(self, action: #selector(bottomButtonDidTap), for: .touchUpInside) } + + public func setImage(_ image: UIImage, size: CGSize) { + self.mainImageView.image = image + self.mainImageView.snp.updateConstraints { make in + make.width.equalTo(size.width) + make.height.equalTo(size.height) + } + } } // MARK: - @objc Function @@ -68,6 +78,7 @@ extension ListEmptyView { extension ListEmptyView { @objc private func bottomButtonDidTap() { delegate?.emptyViewButtonTapped() + self.buttonTapAction?() } } diff --git a/Runnect-iOS/Runnect-iOS/Global/Utils/RNUtils/UserManager.swift b/Runnect-iOS/Runnect-iOS/Global/Utils/RNUtils/UserManager.swift index 303240ec..50305d6f 100644 --- a/Runnect-iOS/Runnect-iOS/Global/Utils/RNUtils/UserManager.swift +++ b/Runnect-iOS/Runnect-iOS/Global/Utils/RNUtils/UserManager.swift @@ -51,6 +51,7 @@ final class UserManager { self.accessToken = data.accessToken self.refreshToken = data.refreshToken self.isKakao = provider == "KAKAO" ? true : false + UserManager.shared.userType = .registered completion(.success(data.type)) // 로그인인지 회원가입인지 전달 } catch { print(error.localizedDescription) diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseStorage/VC/CourseStorageVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseStorage/VC/CourseStorageVC.swift index e72b546b..a7a62d32 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseStorage/VC/CourseStorageVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseStorage/VC/CourseStorageVC.swift @@ -47,6 +47,7 @@ final class CourseStorageVC: UIViewController { override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) + guard UserManager.shared.userType != .visitor else { return } self.getPrivateCourseList() self.getScrapCourseList() } @@ -107,13 +108,20 @@ extension CourseStorageVC { } private func setLayout() { - view.addSubviews(naviBar, viewPager) + view.addSubviews(naviBar) naviBar.snp.makeConstraints { make in make.leading.top.trailing.equalTo(view.safeAreaLayoutGuide) make.height.equalTo(48) } + guard UserManager.shared.userType != .visitor else { + self.showSignInRequestEmptyView() + return + } + + view.addSubview(viewPager) + viewPager.snp.makeConstraints { make in make.top.equalTo(naviBar.snp.bottom) make.leading.bottom.trailing.equalTo(view.safeAreaLayoutGuide) diff --git a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/MyPageVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/MyPageVC.swift index 070e91f9..61995391 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/MyPageVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/MyPageVC.swift @@ -107,11 +107,11 @@ final class MyPageVC: UIViewController { setNavigationBar() setUI() setLayout() - getMyPageInfo() } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) + guard UserManager.shared.userType != .visitor else { return } self.getMyPageInfo() } } @@ -263,6 +263,11 @@ extension MyPageVC { } private func setLayout() { + guard UserManager.shared.userType != .visitor else { + self.showSignInRequestEmptyView() + return + } + view.addSubviews(myProfileView, myRunningProgressView, firstDivideView, goalRewardInfoView, secondDivideView, activityRecordInfoView, thirdDivideView, uploadedCourseInfoView, fourthDivideView, settingView) From b9b07ab9a296f7cfd6691fa4d25f2a473399dd71 Mon Sep 17 00:00:00 2001 From: Sejin Lee Date: Mon, 15 May 2023 10:04:17 +0900 Subject: [PATCH 07/14] =?UTF-8?q?[Feat]=20#132=20-=20=EB=B0=A9=EB=AC=B8?= =?UTF-8?q?=EC=9E=90=EC=9D=BC=20=EA=B2=BD=EC=9A=B0=EB=A5=BC=20=EB=8C=80?= =?UTF-8?q?=EB=B9=84=ED=95=B4=20API=20=ED=97=A4=EB=8D=94=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Network/Service/AuthInterceptor.swift | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Runnect-iOS/Runnect-iOS/Network/Service/AuthInterceptor.swift b/Runnect-iOS/Runnect-iOS/Network/Service/AuthInterceptor.swift index 8470cc98..41be8ff1 100644 --- a/Runnect-iOS/Runnect-iOS/Network/Service/AuthInterceptor.swift +++ b/Runnect-iOS/Runnect-iOS/Network/Service/AuthInterceptor.swift @@ -18,6 +18,16 @@ final class AuthInterceptor: RequestInterceptor { private init() {} func adapt(_ urlRequest: URLRequest, for session: Session, completion: @escaping (Result) -> Void) { + var urlRequest = urlRequest + + // 방문자일 경우 + if UserManager.shared.userType == .visitor && urlRequest.url?.absoluteString.hasPrefix(Config.baseURL) == true { + urlRequest.setValue("visitor", forHTTPHeaderField: "accessToken") + urlRequest.setValue("null", forHTTPHeaderField: "refreshToken") + completion(.success(urlRequest)) + return + } + guard urlRequest.url?.absoluteString.hasPrefix(Config.baseURL) == true, let accessToken = UserManager.shared.accessToken, let refreshToken = UserManager.shared.refreshToken @@ -26,7 +36,6 @@ final class AuthInterceptor: RequestInterceptor { return } - var urlRequest = urlRequest urlRequest.setValue(accessToken, forHTTPHeaderField: "accessToken") urlRequest.setValue(refreshToken, forHTTPHeaderField: "refreshToken") print("adator 적용 \(urlRequest.headers)") @@ -38,6 +47,7 @@ final class AuthInterceptor: RequestInterceptor { guard let response = request.task?.response as? HTTPURLResponse, response.statusCode == 401, let pathComponents = request.request?.url?.pathComponents, !pathComponents.contains("getNewToken") else { + dump(error) completion(.doNotRetryWithError(error)) return } From 1a70f7ac7c99f998120b789767b8f44f043ee88c Mon Sep 17 00:00:00 2001 From: Sejin Lee Date: Mon, 15 May 2023 10:15:26 +0900 Subject: [PATCH 08/14] =?UTF-8?q?[Feat]=20#132=20-=20=EB=B0=A9=EB=AC=B8?= =?UTF-8?q?=EC=9E=90=EC=9D=BC=20=EA=B2=BD=EC=9A=B0=20=EC=BD=94=EC=8A=A4=20?= =?UTF-8?q?=EC=97=85=EB=A1=9C=EB=93=9C=EB=A5=BC=20=EB=AA=BB=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Global/Extension/UIKit+/UIViewController+.swift | 5 +++++ Runnect-iOS/Runnect-iOS/Global/Utils/Toast.swift | 6 +++--- .../CourseDiscovery/Views/VC/CourseDiscoveryVC.swift | 6 ++++++ .../Presentation/Running/VC/RunningRecordVC.swift | 3 +-- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIViewController+.swift b/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIViewController+.swift index 3cd7bf78..a61a029b 100644 --- a/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIViewController+.swift +++ b/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIViewController+.swift @@ -79,4 +79,9 @@ extension UIViewController { make.leading.trailing.equalTo(view.safeAreaLayoutGuide).inset(80) } } + + func showToastOnWindow(text: String) { + let window = self.view.window! + Toast.show(message: text, view: window, safeAreaBottomInset: self.safeAreaBottomInset()) + } } diff --git a/Runnect-iOS/Runnect-iOS/Global/Utils/Toast.swift b/Runnect-iOS/Runnect-iOS/Global/Utils/Toast.swift index 0ff39dea..d2b8dbc6 100644 --- a/Runnect-iOS/Runnect-iOS/Global/Utils/Toast.swift +++ b/Runnect-iOS/Runnect-iOS/Global/Utils/Toast.swift @@ -25,9 +25,9 @@ public class Toast { let toastContainer = UIView() let toastLabel = UILabel() - toastContainer.backgroundColor = UIColor.g2.withAlphaComponent(0.8) + toastContainer.backgroundColor = UIColor.g2.withAlphaComponent(0.7) toastContainer.alpha = 1.0 - toastContainer.layer.cornerRadius = 20 + toastContainer.layer.cornerRadius = 15 toastContainer.clipsToBounds = true toastContainer.isUserInteractionEnabled = false @@ -48,7 +48,7 @@ public class Toast { $0.centerX.equalToSuperview() $0.bottom.equalToSuperview().inset(safeAreaBottomInset+160) $0.width.equalTo(toastConatinerWidth) - $0.height.equalTo(44) + $0.height.equalTo(31) } toastLabel.snp.makeConstraints { diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseDiscoveryVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseDiscoveryVC.swift index f4856ab5..ac25e797 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseDiscoveryVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseDiscoveryVC.swift @@ -100,7 +100,13 @@ extension CourseDiscoveryVC { let nextVC = CourseSearchVC() self.navigationController?.pushViewController(nextVC, animated: true) } + @objc private func pushToDiscoveryVC() { + guard UserManager.shared.userType != .visitor else { + self.showToastOnWindow(text: "러넥트에 가입하면 코스를 업로드할 수 있어요.") + return + } + let nextVC = MyCourseSelectVC() self.navigationController?.pushViewController(nextVC, animated: true) } diff --git a/Runnect-iOS/Runnect-iOS/Presentation/Running/VC/RunningRecordVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/Running/VC/RunningRecordVC.swift index 3cabf2c6..2cf56c18 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/Running/VC/RunningRecordVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/Running/VC/RunningRecordVC.swift @@ -305,8 +305,7 @@ extension RunningRecordVC { case .success(let result): let status = result.statusCode if 200..<300 ~= status { - let window = self.view.window! - Toast.show(message: "저장한 러닝 기록은 마이페이지에서 볼 수 있어요.", view: window, safeAreaBottomInset: self.safeAreaBottomInset()) + self.showToastOnWindow(text: "저장한 러닝 기록은 마이페이지에서 볼 수 있어요.") self.navigationController?.popToRootViewController(animated: true) } if status >= 400 { From 11c9e2ffac937f1d317455569c76f7b4e1313add Mon Sep 17 00:00:00 2001 From: Sejin Lee Date: Mon, 15 May 2023 10:23:04 +0900 Subject: [PATCH 09/14] =?UTF-8?q?[Feat]=20#132=20-=20=EB=B0=A9=EB=AC=B8?= =?UTF-8?q?=EC=9E=90=EC=9D=BC=20=EA=B2=BD=EC=9A=B0=20=EC=BD=94=EC=8A=A4=20?= =?UTF-8?q?=EC=8A=A4=ED=81=AC=EB=9E=A9=20=EB=B6=84=EA=B8=B0=EC=B2=98?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Presentation/CourseDetail/VC/CourseDetailVC.swift | 5 +++++ .../CourseDiscovery/Views/VC/CourseDiscoveryVC.swift | 5 +++++ .../Presentation/CourseStorage/Views/CVC/CourseListCVC.swift | 4 +++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDetail/VC/CourseDetailVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseDetail/VC/CourseDetailVC.swift index 7f582e02..616a3ecf 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDetail/VC/CourseDetailVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDetail/VC/CourseDetailVC.swift @@ -121,6 +121,11 @@ final class CourseDetailVC: UIViewController { extension CourseDetailVC { @objc func likeButtonDidTap(_ sender: UIButton) { + guard UserManager.shared.userType != .visitor else { + showToastOnWindow(text: "러넥트에 가입하면 코스를 스크랩할 수 있어요") + return + } + scrapCourse(scrapTF: !sender.isSelected) } diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseDiscoveryVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseDiscoveryVC.swift index ac25e797..eeac343b 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseDiscoveryVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseDiscoveryVC.swift @@ -248,6 +248,11 @@ extension CourseDiscoveryVC: UICollectionViewDelegateFlowLayout { extension CourseDiscoveryVC: CourseListCVCDeleagte { func likeButtonTapped(wantsTolike: Bool, index: Int) { + guard UserManager.shared.userType != .visitor else { + showToastOnWindow(text: "러넥트에 가입하면 코스를 스크랩할 수 있어요") + return + } + let publicCourseId = courseList[index].id scrapCourse(publicCourseId: publicCourseId, scrapTF: wantsTolike) } diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseStorage/Views/CVC/CourseListCVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseStorage/Views/CVC/CourseListCVC.swift index 9bcf12c5..44a3838c 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseStorage/Views/CVC/CourseListCVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseStorage/Views/CVC/CourseListCVC.swift @@ -128,7 +128,9 @@ extension CourseListCVC { extension CourseListCVC { @objc func likeButtonDidTap(_ sender: UIButton) { guard let indexPath = self.indexPath else { return } - sender.isSelected.toggle() + if UserManager.shared.userType != .visitor { + sender.isSelected.toggle() + } delegate?.likeButtonTapped(wantsTolike: (sender.isSelected == true), index: indexPath) } } From 77744917e4b8add430a0cb131790e9490cd654b4 Mon Sep 17 00:00:00 2001 From: Sejin Lee Date: Mon, 15 May 2023 22:27:08 +0900 Subject: [PATCH 10/14] =?UTF-8?q?[Feat]=20#132=20-=20CourseListCVC=20?= =?UTF-8?q?=ED=95=98=ED=8A=B8=20=EB=B2=84=ED=8A=BC=20=ED=81=AC=EA=B8=B0=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ic_heart.imageset/Component 91.png | Bin 0 -> 464 bytes .../ic_heart.imageset/Component 91@2x.png | Bin 0 -> 990 bytes .../ic_heart.imageset/Component 91@3x.png | Bin 0 -> 1478 bytes .../ic_heart.imageset/Contents.json | 6 +++--- ...rty 1=Component 77, Property 2=btn_heart2.png | Bin 673 -> 0 bytes ... 1=Component 77, Property 2=btn_heart2@2x.png | Bin 1320 -> 0 bytes ... 1=Component 77, Property 2=btn_heart2@3x.png | Bin 1882 -> 0 bytes .../CourseStorage/Views/CVC/CourseListCVC.swift | 9 +++++---- 8 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/ic_heart.imageset/Component 91.png create mode 100644 Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/ic_heart.imageset/Component 91@2x.png create mode 100644 Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/ic_heart.imageset/Component 91@3x.png delete mode 100644 Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/ic_heart.imageset/Property 1=Component 77, Property 2=btn_heart2.png delete mode 100644 Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/ic_heart.imageset/Property 1=Component 77, Property 2=btn_heart2@2x.png delete mode 100644 Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/ic_heart.imageset/Property 1=Component 77, Property 2=btn_heart2@3x.png diff --git a/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/ic_heart.imageset/Component 91.png b/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/ic_heart.imageset/Component 91.png new file mode 100644 index 0000000000000000000000000000000000000000..39f63fd33edeb0fad1c0ed696e65ed9f55c36f47 GIT binary patch literal 464 zcmV;>0WbcEP)%p0Cvi$Zw0H=uCjK9dnS65EXT}8zv4? z5UDFL!c&3+;ZQhFEI4xpHG?e6f;kRXi%2xj1Ch=Zc%B!ld6464^$*ZuiP^3F5_CbV zVUrIG?5Uey0=Z}#NBL#Z0!`B-nBfAS-NR=Wbpv?W^z>@Ay3-V4*Dz7n^-kRY2<}*q zcs5b?O0h?0Qf?U~{L0000;5(w&NhM&QbV?+(xG#9cIMl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yx|N~+aF zr7fr_IDoYrnmL0j$7r)z>Uo|GZTb%kBoR3`V2;s2c-LmEoy7^Tn$&YGip%Wj?kpuI zMS+BiKi3ShGvnlpFJ3C?wkCW zsq!-kr4b(@sUB8CncR+|^x_2m4+|P8M{p#LevwAah0-}6MZ(rNa7A4z1F8bt+7*7^ gm@AldCzuz101@}82~fEi{{R3007*qoM6N<$f-VuRH2?qr literal 0 HcmV?d00001 diff --git a/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/ic_heart.imageset/Contents.json b/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/ic_heart.imageset/Contents.json index e38bc455..b31bb323 100644 --- a/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/ic_heart.imageset/Contents.json +++ b/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/ic_heart.imageset/Contents.json @@ -1,17 +1,17 @@ { "images" : [ { - "filename" : "Property 1=Component 77, Property 2=btn_heart2.png", + "filename" : "Component 91.png", "idiom" : "universal", "scale" : "1x" }, { - "filename" : "Property 1=Component 77, Property 2=btn_heart2@2x.png", + "filename" : "Component 91@2x.png", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "Property 1=Component 77, Property 2=btn_heart2@3x.png", + "filename" : "Component 91@3x.png", "idiom" : "universal", "scale" : "3x" } diff --git a/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/ic_heart.imageset/Property 1=Component 77, Property 2=btn_heart2.png b/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/ic_heart.imageset/Property 1=Component 77, Property 2=btn_heart2.png deleted file mode 100644 index b244240c4b2694f5f704678d3f99dc74de343c8b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 673 zcmV;S0$%-zP)S|9M34)-Q%jK$2577!boGh2iey7vvId*wtOwIE=AKfBa9{Lz| zvJ1{yxcw_lM5Fs6?X}1s1>PL2P z)<*<%A|svwTcC5jP2dy&(vJI_ZUU#YTCGGQ;WJ&UfozwA9}pdS z2z{v@da_5cxJG_iNRUzq!!R#<65bP4GahnEZ8DkovM0g0`l^l%4(&!eHQAFO)2jOK zlb|OrH_>Mf%MXS3irGUD&#k@dh#p!fR}& zIR#>&7KI#J5ikmbbF9n(>d2Q#2+kr$9axpuh^#UijUG#-(i67pKg%%n;cz(G1ss>^ zMBa+!8N9z;BcKqlTrTrQ`y>Jh$L?i|=N23hM5qXt?tJe3g27;rI3)gOB-qL;{LU@7 z-FH_u)*pm@gx|I3YlTEOwl9^Ic+UA~8Nkon7jGv53xtw;2Z92+%(4i2W{H_CJW%(E z{1SnZo>iN@*Oe*KU=?ZiRPBUWA3>is#88JyR3T#X&^6{1XxXP00000NkvXX Hu0mjfa2g%c diff --git a/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/ic_heart.imageset/Property 1=Component 77, Property 2=btn_heart2@2x.png b/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/ic_heart.imageset/Property 1=Component 77, Property 2=btn_heart2@2x.png deleted file mode 100644 index 1701a2fef20ff78cc3a732ed5980da5e14332f46..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1320 zcmV+@1=sqCP)+U<73^SsSkt+s^M09V6Y#E{q1 z(^LQP@iFT4dPB(pOXpX3ZQ}Ax(Fii?Dm&>0>dA9qp)V2E3|eNvT& zP_%V;co@kP(7#dl9He|p920BIqH}k5cN4b*rBm>}7Ju(q@~$ZIhyrVQ8X`E!Q2!ks z`4gI=H{mTYygJjKz-LKO5O&--n!kO)ggt*#~>Hz=-4uF-X7o0Bs{kp!_d8zIicp% zI!5M9<^**9EtX4iE_mpzma5m65s!pX1Fi3FJ2ISp!z9teJ zX~57fj90iSg8L*%8Zh*DfUqmw-rhE)qF7j1(AgC$iKi;Gol%SB5!k=^bT2WS;^Jp{L6}_92V2HtWw+Z+9F9_nEoRg}IFO{}?@eZGATNN7{8WUa z?v}3WxfIZqbSeX*(q(#3zA)H^CQmM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B8=EC=9D=B4=20=EB=90=98=EC=A7=80=20=EC=95=8A=EB=8A=94=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Runnect-iOS/Global/Supports/SceneDelegate.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Runnect-iOS/Runnect-iOS/Global/Supports/SceneDelegate.swift b/Runnect-iOS/Runnect-iOS/Global/Supports/SceneDelegate.swift index f2baba80..5f92b293 100644 --- a/Runnect-iOS/Runnect-iOS/Global/Supports/SceneDelegate.swift +++ b/Runnect-iOS/Runnect-iOS/Global/Supports/SceneDelegate.swift @@ -6,6 +6,8 @@ // import UIKit +import KakaoSDKAuth +import KakaoSDKCommon class SceneDelegate: UIResponder, UIWindowSceneDelegate { @@ -21,6 +23,14 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { self.window = window window.makeKeyAndVisible() } + + func scene(_ scene: UIScene, openURLContexts URLContexts: Set) { + if let url = URLContexts.first?.url { + if (AuthApi.isKakaoTalkLoginUrl(url)) { + _ = AuthController.handleOpenUrl(url: url) + } + } + } func sceneDidDisconnect(_ scene: UIScene) { // Called as the scene is being released by the system. From 3a3a4123710ec5d09318ea5ef8d4cb142c33a28b Mon Sep 17 00:00:00 2001 From: Sejin Lee Date: Mon, 15 May 2023 23:21:43 +0900 Subject: [PATCH 12/14] =?UTF-8?q?[Feat]=20#132=20-=20=EB=B2=84=EC=A0=80?= =?UTF-8?q?=EB=8B=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runnect-iOS/Runnect-iOS.xcodeproj/project.pbxproj | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Runnect-iOS/Runnect-iOS.xcodeproj/project.pbxproj b/Runnect-iOS/Runnect-iOS.xcodeproj/project.pbxproj index 2f5ace6c..e1148180 100644 --- a/Runnect-iOS/Runnect-iOS.xcodeproj/project.pbxproj +++ b/Runnect-iOS/Runnect-iOS.xcodeproj/project.pbxproj @@ -1596,11 +1596,12 @@ CODE_SIGN_ENTITLEMENTS = "Runnect-iOS/Runnect-iOS.entitlements"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 23051501; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 9K86FQHDLU; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = "Runnect-iOS/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = Runnect; INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "위치 정보 권한이 필요합니다."; INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "위치 정보 권한이 필요합니다."; INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "위치 정보 권한이 필요합니다."; @@ -1633,11 +1634,12 @@ CODE_SIGN_ENTITLEMENTS = "Runnect-iOS/Runnect-iOS.entitlements"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 23051501; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 9K86FQHDLU; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = "Runnect-iOS/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = Runnect; INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "위치 정보 권한이 필요합니다."; INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "위치 정보 권한이 필요합니다."; INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "위치 정보 권한이 필요합니다."; From d18b938e6d2661be3b6f0113a710954f1e29db4d Mon Sep 17 00:00:00 2001 From: Sejin Lee Date: Mon, 15 May 2023 23:27:52 +0900 Subject: [PATCH 13/14] =?UTF-8?q?[Fix]=20#132=20-=20=ED=95=98=ED=8A=B8=20?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=20=EC=83=89=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Presentation/CourseStorage/Views/CVC/CourseListCVC.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseStorage/Views/CVC/CourseListCVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseStorage/Views/CVC/CourseListCVC.swift index 462f3a87..7ca1f921 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseStorage/Views/CVC/CourseListCVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseStorage/Views/CVC/CourseListCVC.swift @@ -71,10 +71,9 @@ final class CourseListCVC: UICollectionViewCell { } private let likeButton = UIButton(type: .custom).then { - $0.setImage(ImageLiterals.icHeartFill.withRenderingMode(.alwaysTemplate), for: .selected) + $0.setImage(ImageLiterals.icHeartFill, for: .selected) $0.setImage(ImageLiterals.icHeart, for: .normal) $0.backgroundColor = .w1 - $0.tintColor = .g4 } // MARK: - initialization From a62b5125de3d616b012c603dd89a3664c88c8b06 Mon Sep 17 00:00:00 2001 From: Sejin Lee Date: Mon, 15 May 2023 23:29:45 +0900 Subject: [PATCH 14/14] =?UTF-8?q?[Feat]=20#132=20-=20=EC=BD=94=EC=8A=A4=20?= =?UTF-8?q?=EA=B2=80=EC=83=89=EC=97=90=20=EB=B0=A9=EB=AC=B8=EC=9E=90=20?= =?UTF-8?q?=ED=94=8C=EB=A1=9C=EC=9A=B0=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CourseDiscovery/Views/VC/CourseSearchVC.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseSearchVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseSearchVC.swift index 5d3d7fa4..1e5f66b9 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseSearchVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseSearchVC.swift @@ -204,6 +204,11 @@ extension CourseSearchVC: CustomNavigationBarDelegate { extension CourseSearchVC: CourseListCVCDeleagte { func likeButtonTapped(wantsTolike: Bool, index: Int) { + guard UserManager.shared.userType != .visitor else { + showToastOnWindow(text: "러넥트에 가입하면 코스를 스크랩할 수 있어요") + return + } + let pubilcCourseId = courseList[index].id scrapCourse(publicCourseId: pubilcCourseId, scrapTF: wantsTolike) }