From 7034dbfdbd8b913acbe1c0115eb8bbfcb2c750df Mon Sep 17 00:00:00 2001 From: LeeMyeongJin Date: Sun, 14 Jan 2024 18:30:41 +0900 Subject: [PATCH 01/17] =?UTF-8?q?[Fix]=20#246=20-=20defer=20=EC=88=9C?= =?UTF-8?q?=EC=84=9C=20=EC=BD=94=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../img_banner1.imageset/Contents.json | 6 +++--- .../ios\353\260\260\353\204\210x1.png" | Bin .../ios\353\260\260\353\204\210x2.png" | Bin .../ios\353\260\260\353\204\210x3.png" | Bin .../Views/MarathonMapCollectionViewCell.swift | 10 +++++++--- 5 files changed, 10 insertions(+), 6 deletions(-) rename "Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/ios \354\225\261 \353\260\260\353\204\210.png" => "Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/ios\353\260\260\353\204\210x1.png" (100%) rename "Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/ios \354\225\261 \353\260\260\353\204\210@2x.png" => "Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/ios\353\260\260\353\204\210x2.png" (100%) rename "Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/ios \354\225\261 \353\260\260\353\204\210@3x.png" => "Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/ios\353\260\260\353\204\210x3.png" (100%) diff --git a/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/Contents.json b/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/Contents.json index bf0d6034..334c5c52 100644 --- a/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/Contents.json +++ b/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/Contents.json @@ -1,17 +1,17 @@ { "images" : [ { - "filename" : "ios 앱 배너.png", + "filename" : "ios배너x1.png", "idiom" : "universal", "scale" : "1x" }, { - "filename" : "ios 앱 배너@2x.png", + "filename" : "ios배너x2.png", "idiom" : "universal", "scale" : "2x" }, { - "filename" : "ios 앱 배너@3x.png", + "filename" : "ios배너x3.png", "idiom" : "universal", "scale" : "3x" } diff --git "a/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/ios \354\225\261 \353\260\260\353\204\210.png" "b/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/ios\353\260\260\353\204\210x1.png" similarity index 100% rename from "Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/ios \354\225\261 \353\260\260\353\204\210.png" rename to "Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/ios\353\260\260\353\204\210x1.png" diff --git "a/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/ios \354\225\261 \353\260\260\353\204\210@2x.png" "b/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/ios\353\260\260\353\204\210x2.png" similarity index 100% rename from "Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/ios \354\225\261 \353\260\260\353\204\210@2x.png" rename to "Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/ios\353\260\260\353\204\210x2.png" diff --git "a/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/ios \354\225\261 \353\260\260\353\204\210@3x.png" "b/Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/ios\353\260\260\353\204\210x3.png" similarity index 100% rename from "Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/ios \354\225\261 \353\260\260\353\204\210@3x.png" rename to "Runnect-iOS/Runnect-iOS/Global/Resource/Assets.xcassets/img_banner1.imageset/ios\353\260\260\353\204\210x3.png" diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/MarathonMapCollectionViewCell.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/MarathonMapCollectionViewCell.swift index e67307e3..d371faa9 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/MarathonMapCollectionViewCell.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/MarathonMapCollectionViewCell.swift @@ -205,16 +205,20 @@ extension MarathonMapCollectionViewCell { private func scrapCourse(publicCourseId: Int, scrapTF: Bool) { LoadingIndicator.showLoading() + scrapProvider.request(.createAndDeleteScrap(publicCourseId: publicCourseId, scrapTF: scrapTF)) { [weak self] response in - LoadingIndicator.hideLoading() + defer { + LoadingIndicator.hideLoading() + } + guard let self = self else { return } + switch response { case .success(let result): let status = result.statusCode if 200..<300 ~= status { print("스크랩 성공") - } - if status >= 400 { + } else if status >= 400 { print("400 error") } case .failure(let error): From 0f49f42175071d57e934211865d7db8cacbf94f5 Mon Sep 17 00:00:00 2001 From: LeeMyeongJin Date: Mon, 15 Jan 2024 19:53:25 +0900 Subject: [PATCH 02/17] =?UTF-8?q?[Setting]=20#246=20-=20GA=20=EB=94=94?= =?UTF-8?q?=EB=B2=84=EA=B9=85=20=EB=AA=A8=EB=93=9C=20=ED=95=B4=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xcshareddata/xcschemes/Runnect-iOS.xcscheme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runnect-iOS/Runnect-iOS.xcodeproj/xcshareddata/xcschemes/Runnect-iOS.xcscheme b/Runnect-iOS/Runnect-iOS.xcodeproj/xcshareddata/xcschemes/Runnect-iOS.xcscheme index 1ee1ed34..03f5e3ec 100644 --- a/Runnect-iOS/Runnect-iOS.xcodeproj/xcshareddata/xcschemes/Runnect-iOS.xcscheme +++ b/Runnect-iOS/Runnect-iOS.xcodeproj/xcshareddata/xcschemes/Runnect-iOS.xcscheme @@ -54,7 +54,7 @@ + isEnabled = "NO"> From 7b72e1db96607f0b48d02e1cedc8a97166a64316 Mon Sep 17 00:00:00 2001 From: LeeMyeongJin Date: Mon, 15 Jan 2024 19:56:10 +0900 Subject: [PATCH 03/17] =?UTF-8?q?[Feat]=20#246=20-=20=ED=83=AD=EB=B0=94=20?= =?UTF-8?q?GA=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 탭바 의 터치 이벤트를 extension 으로 추가 구현하였습니다. --- .../Presentation/TabBar/TaBarController.swift | 45 +++++++++++++------ 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/Runnect-iOS/Runnect-iOS/Presentation/TabBar/TaBarController.swift b/Runnect-iOS/Runnect-iOS/Presentation/TabBar/TaBarController.swift index 208d54cf..bf72afe2 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/TabBar/TaBarController.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/TabBar/TaBarController.swift @@ -13,6 +13,7 @@ final class TabBarController: UITabBarController { override func viewDidLoad() { super.viewDidLoad() + delegate = self setUI() setTabBarControllers() } @@ -32,21 +33,21 @@ extension TabBarController { private func setTabBarControllers() { let courseDrawingNVC = templateNavigationController(title: "코스 그리기", - unselectedImage: ImageLiterals.icCourseDraw, - selectedImage: ImageLiterals.icCourseDrawFill, - rootViewController: CourseDrawingHomeVC()) + unselectedImage: ImageLiterals.icCourseDraw, + selectedImage: ImageLiterals.icCourseDrawFill, + rootViewController: CourseDrawingHomeVC()) let courseStorageNVC = templateNavigationController(title: "보관함", - unselectedImage: ImageLiterals.icStorage, - selectedImage: ImageLiterals.icStorageFill, - rootViewController: CourseStorageVC()) + unselectedImage: ImageLiterals.icStorage, + selectedImage: ImageLiterals.icStorageFill, + rootViewController: CourseStorageVC()) let courseDiscoveryNVC = templateNavigationController(title: "코스 발견", - unselectedImage: ImageLiterals.icCourseDiscover, - selectedImage: ImageLiterals.icCourseDiscoverFill, - rootViewController: CourseDiscoveryVC()) + unselectedImage: ImageLiterals.icCourseDiscover, + selectedImage: ImageLiterals.icCourseDiscoverFill, + rootViewController: CourseDiscoveryVC()) let myPageNVC = templateNavigationController(title: "마이페이지", - unselectedImage: ImageLiterals.icMypage, - selectedImage: ImageLiterals.icMypageFill, - rootViewController: MyPageVC()) + unselectedImage: ImageLiterals.icMypage, + selectedImage: ImageLiterals.icMypageFill, + rootViewController: MyPageVC()) viewControllers = [courseDrawingNVC, courseStorageNVC, courseDiscoveryNVC, myPageNVC] } @@ -59,5 +60,23 @@ extension TabBarController { nav.navigationBar.isHidden = true return nav } - +} + +extension TabBarController: UITabBarControllerDelegate { + func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) { + guard let title = viewController.title else { return } + + switch title { + case "코스 그리기": + analyze(buttonName: GAEvent.Button.clickCourseDrawingTabBar) + case "보관함": + analyze(buttonName: GAEvent.Button.clickStorageTabBar) + case "코스 발견": + analyze(buttonName: GAEvent.Button.clickCourseDiscoveryTabBar) + case "마이페이지": + analyze(buttonName: GAEvent.Button.clickMyPageTabBar) + default: + break + } + } } From 25b9ba3dea5756fca3a6a2285b9587d83a33093f Mon Sep 17 00:00:00 2001 From: LeeMyeongJin Date: Mon, 15 Jan 2024 20:35:13 +0900 Subject: [PATCH 04/17] =?UTF-8?q?[Feat]=20#246=20-=20=EC=BD=94=EC=8A=A4?= =?UTF-8?q?=EA=B7=B8=EB=A6=AC=EA=B8=B0=20GA=20=EC=9D=B4=EB=B2=A4=ED=8A=B8?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CourseDrawing/VC/CourseDrawingHomeVC.swift | 3 +++ .../CourseDrawing/VC/CourseDrawingVC.swift | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingHomeVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingHomeVC.swift index 6e421753..af6c4282 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingHomeVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingHomeVC.swift @@ -50,6 +50,9 @@ extension CourseDrawingHomeVC { // MARK: - @objc Function extension CourseDrawingHomeVC { @objc private func pushToDepartureSearchVC() { + + analyze(buttonName: GAEvent.Button.clickCourseDrawing) + let departureSearchVC = DepartureSearchVC() departureSearchVC.hidesBottomBarWhenPushed = true self.navigationController?.pushViewController(departureSearchVC, animated: true) diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingVC.swift index e7234907..4bfbdd1a 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingVC.swift @@ -194,7 +194,7 @@ extension CourseDrawingVC { mapView.eventSubject.sink { [weak self] arr in guard let self = self else { return } self.searchLocationTmapAddress(latitude: arr[0], longitude: arr[1]) -// self.searchTest(latitude: arr[0], longitude: arr[1]) + // self.searchTest(latitude: arr[0], longitude: arr[1]) }.store(in: cancelBag) } @@ -206,15 +206,21 @@ extension CourseDrawingVC { let alertVC = CustomAlertVC() alertVC.modalPresentationStyle = .overFullScreen + // 보관함 가기 alertVC.leftButtonTapped.sink { [weak self] _ in guard let self = self else { return } + analyze(buttonName: GAEvent.Button.clickStoredAfterCourseComplete) + self.tabBarController?.selectedIndex = 1 self.navigationController?.popToRootViewController(animated: true) alertVC.dismiss(animated: true) }.store(in: cancelBag) + // 바로 달리기 alertVC.rightButtonTapped.sink { [weak self] _ in guard let self = self else { return } + analyze(buttonName: GAEvent.Button.clickRunAfterCourseComplete) + let countDownVC = CountDownVC() let runningModel = RunningModel(courseId: courseId, locations: self.mapView.getMarkersLatLng(), @@ -456,7 +462,7 @@ extension CourseDrawingVC { private func searchLocationTmapAddress(latitude: Double, longitude: Double) { departureSearchingProvider.request(target: .getLocationTmapAddress(latitude: latitude, longitude: longitude), instance: TmapAddressSearchingResponseDto.self, vc: self) { data in - self.updateData(model: data.toDepartureLocationModel(latitude: latitude, longitude: longitude)) + self.updateData(model: data.toDepartureLocationModel(latitude: latitude, longitude: longitude)) } } } From f5d14230e35b4901f8a44682a3fb5d010e0586c9 Mon Sep 17 00:00:00 2001 From: LeeMyeongJin Date: Tue, 16 Jan 2024 01:55:39 +0900 Subject: [PATCH 05/17] =?UTF-8?q?[Add]=20#246=20-=20GAEvent=20=EC=8A=A4?= =?UTF-8?q?=ED=81=AC=EB=A6=B0=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runnect-iOS/Runnect-iOS/Global/Analytics/GAEvent.swift | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Runnect-iOS/Runnect-iOS/Global/Analytics/GAEvent.swift b/Runnect-iOS/Runnect-iOS/Global/Analytics/GAEvent.swift index e18bfe74..b0ed65eb 100644 --- a/Runnect-iOS/Runnect-iOS/Global/Analytics/GAEvent.swift +++ b/Runnect-iOS/Runnect-iOS/Global/Analytics/GAEvent.swift @@ -9,8 +9,15 @@ import Foundation struct GAEvent { struct View { + + // 진입 화면 static let viewHome = "view_home" // 앱 실행 static let viewSocialLogin = "view_social_login" + + // 코스발견 + static let viewCourseSearch = "view_course_search" + static let viewCourseDetail = "view_course_detail" + static let viewUserProfile = "view_user_profile" } struct Button { @@ -43,8 +50,7 @@ struct GAEvent { static let clickUploadButton = "click_upload_button" static let clickTrySearchCourse = "click_try_search_course" static let clickTryBanner = "click_try_banner" - static let clickSearchCourse = "click_search_course" - static let clickCourseDetail = "click_course_detail" + static let clickShare = "click_share" static let clickUserProfile = "click_user_profile" static let clickScrapPageStartCourse = "click_scrap_page_start_course" From 90cf2bde66421c60e6a0813edcc23c2c5dbb207f Mon Sep 17 00:00:00 2001 From: LeeMyeongJin Date: Tue, 16 Jan 2024 02:04:20 +0900 Subject: [PATCH 06/17] =?UTF-8?q?[Feat]=20#246=20-=20=EC=BD=94=EC=8A=A4=20?= =?UTF-8?q?=EB=B0=9C=EA=B2=AC=20GA=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Presentation/CourseDetail/VC/CourseDetailVC.swift | 7 ++++++- .../CourseDiscovery/Views/VC/CourseDiscoveryVC.swift | 11 +++++++++++ .../CourseDiscovery/Views/VC/CourseSearchVC.swift | 2 ++ .../CourseDiscovery/Views/VC/CourseUploadVC.swift | 9 ++++++--- .../CourseStorage/VC/CourseStorageVC.swift | 8 +++++--- .../Presentation/Running/VC/RunningRecordVC.swift | 1 + .../Presentation/UserProfile/UserProfileVC.swift | 1 + 7 files changed, 32 insertions(+), 7 deletions(-) diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDetail/VC/CourseDetailVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseDetail/VC/CourseDetailVC.swift index 0c743b2f..856d7150 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDetail/VC/CourseDetailVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDetail/VC/CourseDetailVC.swift @@ -144,7 +144,7 @@ final class CourseDetailVC: UIViewController { setLayout() setAddTarget() setRefreshControl() - analyze(screenName: "코스 상세 페이지") + analyze(screenName: GAEvent.View.viewCourseDetail) self.hideTabBar(wantsToHide: true) } @@ -177,6 +177,8 @@ extension CourseDetailVC { return } + analyze(buttonName: GAEvent.Button.clickShare) + let publicCourse = model.publicCourse let title = publicCourse.title let courseId = publicCourse.id // primaryKey @@ -231,6 +233,9 @@ extension CourseDetailVC { self.showToast(message: "회원만 조회 가능 합니다.") return } + + analyze(screenName: GAEvent.Button.clickUserProfile) + guard let userId = self.userId else {return} let userProfile = UserProfileVC() userProfile.setUserId(userId: userId) 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 0d7c9f6f..a048ff5a 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseDiscoveryVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseDiscoveryVC.swift @@ -165,6 +165,8 @@ extension CourseDiscoveryVC { return } + analyze(buttonName: GAEvent.Button.clickUploadButton) + let nextVC = MyCourseSelectVC() nextVC.delegate = self self.navigationController?.pushViewController(nextVC, animated: true) @@ -552,5 +554,14 @@ extension CourseDiscoveryVC: TitleCollectionViewCellDelegate { sort = ordering self.courseList.removeAll() getCourseData(pageNo: pageNo) + + switch ordering { + case "date": + analyze(buttonName: GAEvent.Button.clickDate) + case "scrap": + analyze(buttonName: GAEvent.Button.clickScrap) + default: + break + } } } 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 ac5879b2..d340141d 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseSearchVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseSearchVC.swift @@ -73,6 +73,7 @@ final class CourseSearchVC: UIViewController { setDelegate() layout() setTabBar() + analyze(screenName: GAEvent.View.viewCourseSearch) } override func viewWillAppear(_ animated: Bool) { @@ -228,6 +229,7 @@ extension CourseSearchVC { do { let responseDto = try result.map(BaseResponse.self) guard let data = responseDto.data else { return } + self.analyze(buttonName: GAEvent.Button.clickTrySearchCourse) self.setData(data: data.publicCourses) } catch { self.setData(data: []) diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseUploadVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseUploadVC.swift index 92eba72f..b69a82da 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseUploadVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDiscovery/Views/VC/CourseUploadVC.swift @@ -66,6 +66,7 @@ class CourseUploadVC: UIViewController { setKeyboardNotification() setTapGesture() addKeyboardObserver() + analyze(screenName: GAEvent.View.viewCourseUpload) } override func viewWillDisappear(_ animated: Bool) { @@ -95,8 +96,8 @@ extension CourseUploadVC { courseModel.departure.town, courseModel.departure.name ] - .compactMap { $0 } - .joined(separator: " ") + .compactMap { $0 } + .joined(separator: " ") self.departureInfoView.setDescriptionText(description: departureString) } @@ -192,6 +193,8 @@ extension CourseUploadVC { @objc func uploadButtonDidTap() { self.uploadCourse() + + analyze(buttonName: GAEvent.Button.clickCourseUpload) } } @@ -264,7 +267,7 @@ extension CourseUploadVC { make.leading.trailing.equalTo(view.safeAreaLayoutGuide).inset(16) make.height.equalTo(35) } - + dividerView.snp.makeConstraints { make in make.top.equalTo(courseTitleTextField.snp.bottom).offset(0) make.leading.trailing.equalTo(view.safeAreaLayoutGuide).inset(16) diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseStorage/VC/CourseStorageVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseStorage/VC/CourseStorageVC.swift index e332277c..2ecb93cf 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseStorage/VC/CourseStorageVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseStorage/VC/CourseStorageVC.swift @@ -101,11 +101,13 @@ extension CourseStorageVC { privateCourseListView.cellDidTapped.sink { [weak self] index in guard let self = self else { return } + analyze(buttonName: GAEvent.Button.clickScrapPageStartCourse) // 코스 발견_스크랩코스 상세페이지 시작하기 Evnet + let title = self.privateCourseList[index].title let runningWaitingVC = RunningWaitingVC() runningWaitingVC.setData(courseId: self.privateCourseList[index].id, publicCourseId: nil, courseTitle: title) - /// 코스 이름을 여기서 가져오는 로직 + /// 코스 이름을 여기서 가져오는 로직 runningWaitingVC.hidesBottomBarWhenPushed = true self.navigationController?.pushViewController(runningWaitingVC, animated: true) }.store(in: cancelBag) @@ -204,12 +206,12 @@ extension CourseStorageVC { private func setLayout() { view.addSubviews(naviBar) - + naviBar.snp.makeConstraints { make in make.leading.top.trailing.equalTo(view.safeAreaLayoutGuide) make.height.equalTo(56) } - + guard UserManager.shared.userType != .visitor else { self.showSignInRequestEmptyView() return diff --git a/Runnect-iOS/Runnect-iOS/Presentation/Running/VC/RunningRecordVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/Running/VC/RunningRecordVC.swift index 2cf56c18..552ce207 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/Running/VC/RunningRecordVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/Running/VC/RunningRecordVC.swift @@ -305,6 +305,7 @@ extension RunningRecordVC { case .success(let result): let status = result.statusCode if 200..<300 ~= status { + analyze(buttonName: GAEvent.Button.clickStoreRunningTracking) self.showToastOnWindow(text: "저장한 러닝 기록은 마이페이지에서 볼 수 있어요.") self.navigationController?.popToRootViewController(animated: true) } diff --git a/Runnect-iOS/Runnect-iOS/Presentation/UserProfile/UserProfileVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/UserProfile/UserProfileVC.swift index 6b25dc48..881c264d 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/UserProfile/UserProfileVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/UserProfile/UserProfileVC.swift @@ -45,6 +45,7 @@ final class UserProfileVC: UIViewController { setNavigationBar() setDelegate() setLayout() + analyze(screenName: GAEvent.View.viewUserProfile) } override func viewWillAppear(_ animated: Bool) { From 873d717dbb57fcf06eae5088e2912ea83f728816 Mon Sep 17 00:00:00 2001 From: LeeMyeongJin Date: Tue, 16 Jan 2024 02:04:40 +0900 Subject: [PATCH 07/17] =?UTF-8?q?[Add]=20#246=20-=20GAEvent=20=EC=8A=A4?= =?UTF-8?q?=ED=81=AC=EB=A6=B0=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runnect-iOS/Runnect-iOS/Global/Analytics/GAEvent.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Runnect-iOS/Runnect-iOS/Global/Analytics/GAEvent.swift b/Runnect-iOS/Runnect-iOS/Global/Analytics/GAEvent.swift index b0ed65eb..991f1b00 100644 --- a/Runnect-iOS/Runnect-iOS/Global/Analytics/GAEvent.swift +++ b/Runnect-iOS/Runnect-iOS/Global/Analytics/GAEvent.swift @@ -18,6 +18,7 @@ struct GAEvent { static let viewCourseSearch = "view_course_search" static let viewCourseDetail = "view_course_detail" static let viewUserProfile = "view_user_profile" + static let viewCourseUpload = "view_course_upload" } struct Button { @@ -50,11 +51,10 @@ struct GAEvent { static let clickUploadButton = "click_upload_button" static let clickTrySearchCourse = "click_try_search_course" static let clickTryBanner = "click_try_banner" - static let clickShare = "click_share" static let clickUserProfile = "click_user_profile" static let clickScrapPageStartCourse = "click_scrap_page_start_course" - static let clickUploadCourse = "click_upload_course" + static let clickCourseUpload = "click_course_upload" /// 보관함 static let clickMyStorageCourseStart = "click_my_storage_course_start" From 4ffe0f6565fc04cdce9da6736d6d997c27d91259 Mon Sep 17 00:00:00 2001 From: LeeMyeongJin Date: Tue, 16 Jan 2024 02:20:12 +0900 Subject: [PATCH 08/17] =?UTF-8?q?[Style]=20#246=20-=20=EB=84=A4=ED=8A=B8?= =?UTF-8?q?=EC=9B=8C=ED=81=AC=20=EC=BD=94=EB=93=9C=20=ED=8F=AC=EB=A7=B7?= =?UTF-8?q?=ED=8C=85=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runnect-iOS/Runnect-iOS/Network/Service/NetworkProvider.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Runnect-iOS/Runnect-iOS/Network/Service/NetworkProvider.swift b/Runnect-iOS/Runnect-iOS/Network/Service/NetworkProvider.swift index d98f8cba..b3718175 100644 --- a/Runnect-iOS/Runnect-iOS/Network/Service/NetworkProvider.swift +++ b/Runnect-iOS/Runnect-iOS/Network/Service/NetworkProvider.swift @@ -7,8 +7,8 @@ import Moya -class NetworkProvider : MoyaProvider { - func request(target: Provider, instance: Model.Type , vc: UIViewController, completion: @escaping(Model) -> ()){ +class NetworkProvider: MoyaProvider { + func request(target: Provider, instance: Model.Type, vc: UIViewController, completion: @escaping(Model) -> Void) { self.request(target) { result in switch result { /// 서버 통신 성공 From b33448cd3528d1cece726bdee0bf01c9c488310c Mon Sep 17 00:00:00 2001 From: LeeMyeongJin Date: Tue, 16 Jan 2024 14:39:19 +0900 Subject: [PATCH 09/17] =?UTF-8?q?[Feat]=20#246=20-=20=EB=B3=B4=EA=B4=80?= =?UTF-8?q?=ED=95=A8=20GA=20=EC=9D=B4=EB=B2=A4=ED=8A=B8=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runnect-iOS/Runnect-iOS/Global/Analytics/GAEvent.swift | 2 +- .../Presentation/CourseStorage/VC/CourseStorageVC.swift | 4 +++- .../Presentation/Running/VC/RunningWaitingVC.swift | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Runnect-iOS/Runnect-iOS/Global/Analytics/GAEvent.swift b/Runnect-iOS/Runnect-iOS/Global/Analytics/GAEvent.swift index 991f1b00..e0940952 100644 --- a/Runnect-iOS/Runnect-iOS/Global/Analytics/GAEvent.swift +++ b/Runnect-iOS/Runnect-iOS/Global/Analytics/GAEvent.swift @@ -57,7 +57,7 @@ struct GAEvent { static let clickCourseUpload = "click_course_upload" /// 보관함 - static let clickMyStorageCourseStart = "click_my_storage_course_start" + static let clickMyStorageCourseDrawingStart = "click_my_storage_course_drawing_start" static let clickMyStorageTryModify = "click_my_storage_try_modify" static let clickMyStorageTryRemove = "click_my_storage_try_remove" static let clickScrapCourse = "click_scrap_course" diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseStorage/VC/CourseStorageVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseStorage/VC/CourseStorageVC.swift index 2ecb93cf..996a3489 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseStorage/VC/CourseStorageVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseStorage/VC/CourseStorageVC.swift @@ -91,6 +91,8 @@ extension CourseStorageVC { privateCourseListView.courseDrawButtonTapped.sink { [weak self] in guard let self = self else { return } + + analyze(buttonName: GAEvent.Button.clickMyStorageCourseDrawingStart) // 내가 그린 코스 코스 그리기 진입 self.tabBarController?.selectedIndex = 0 }.store(in: cancelBag) @@ -101,7 +103,7 @@ extension CourseStorageVC { privateCourseListView.cellDidTapped.sink { [weak self] index in guard let self = self else { return } - analyze(buttonName: GAEvent.Button.clickScrapPageStartCourse) // 코스 발견_스크랩코스 상세페이지 시작하기 Evnet + analyze(buttonName: GAEvent.Button.clickScrapPageStartCourse) // 코스 발견_스크랩코스 상세페이지 시작하기 Event let title = self.privateCourseList[index].title let runningWaitingVC = RunningWaitingVC() diff --git a/Runnect-iOS/Runnect-iOS/Presentation/Running/VC/RunningWaitingVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/Running/VC/RunningWaitingVC.swift index c712e77c..2aba81c8 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/Running/VC/RunningWaitingVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/Running/VC/RunningWaitingVC.swift @@ -323,8 +323,10 @@ extension RunningWaitingVC { switch item { case "수정하기": + analyze(buttonName: GAEvent.Button.clickMyStorageTryModify) ModifyCourseTitle() case "삭제하기": + analyze(buttonName: GAEvent.Button.clickMyStorageTryRemove) let deleteAlertVC = RNAlertVC(description: "러닝 기록을 정말로 삭제하시겠어요?").setButtonTitle("취소", "삭제하기") deleteAlertVC.modalPresentationStyle = .overFullScreen deleteAlertVC.rightButtonTapAction = { From 6bd780b2d461b877ec586221702cc40f906d3487 Mon Sep 17 00:00:00 2001 From: LeeMyeongJin Date: Tue, 16 Jan 2024 19:52:13 +0900 Subject: [PATCH 10/17] =?UTF-8?q?[Feat]=20#246=20-=20=EB=A7=88=EC=9D=B4?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20GA=20=EC=9D=B4=EB=B2=A4=ED=8A=B8?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Runnect-iOS/Runnect-iOS/Global/Analytics/GAEvent.swift | 6 ++++-- .../MyPage/VC/InfoVC/ActivityRecordInfoVC.swift | 2 ++ .../MyPage/VC/InfoVC/UploadedCourseInfoVC.swift | 8 +++++--- .../Runnect-iOS/Presentation/MyPage/VC/MyPageVC.swift | 3 +++ .../Presentation/MyPage/VC/SettingVC/PersonalInfoVC.swift | 4 ++++ 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Runnect-iOS/Runnect-iOS/Global/Analytics/GAEvent.swift b/Runnect-iOS/Runnect-iOS/Global/Analytics/GAEvent.swift index e0940952..b97ef3e3 100644 --- a/Runnect-iOS/Runnect-iOS/Global/Analytics/GAEvent.swift +++ b/Runnect-iOS/Runnect-iOS/Global/Analytics/GAEvent.swift @@ -19,6 +19,10 @@ struct GAEvent { static let viewCourseDetail = "view_course_detail" static let viewUserProfile = "view_user_profile" static let viewCourseUpload = "view_course_upload" + + // 마이페이지 + static let viewSuccessLogout = "view_success_logout" + static let viewSuccessWithdraw = "view_success_withdraw" } struct Button { @@ -70,8 +74,6 @@ struct GAEvent { static let clickCourseUploadInUploadedCourse = "click_course_upload_in_uploaded_course" static let clickTryLogout = "click_try_logout" static let clickTryWithdraw = "click_try_withdraw" - static let clickSuccessLogout = "click_success_logout" - static let clickSuccessWithdraw = "click_success_withdraw" /// 방문자 모드 static let clickJoinInCourseDrawing = "click_join_in_course_drawing" diff --git a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/ActivityRecordInfoVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/ActivityRecordInfoVC.swift index 148d1a3d..90afa4ea 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/ActivityRecordInfoVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/ActivityRecordInfoVC.swift @@ -293,6 +293,8 @@ extension ActivityRecordInfoVC: UITableViewDataSource { extension ActivityRecordInfoVC: ListEmptyViewDelegate { func emptyViewButtonTapped() { + analyze(buttonName: GAEvent.Button.clickCourseDrawingInRunningRecord) + self.tabBarController?.selectedIndex = 0 } } diff --git a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/UploadedCourseInfoVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/UploadedCourseInfoVC.swift index 3c69fa85..80ded91c 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/UploadedCourseInfoVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/InfoVC/UploadedCourseInfoVC.swift @@ -68,8 +68,8 @@ final class UploadedCourseInfoVC: UIViewController { $0.titleLabel?.font = .b5 $0.layer.backgroundColor = UIColor.m3.cgColor $0.layer.cornerRadius = 11 -// $0.layer.borderColor = UIColor.m1.cgColor -// $0.layer.borderWidth = 1 + // $0.layer.borderColor = UIColor.m1.cgColor + // $0.layer.borderWidth = 1 } private lazy var deleteCourseButton = CustomButton(title: "삭제하기").then { @@ -283,7 +283,7 @@ extension UploadedCourseInfoVC: UICollectionViewDelegate, UICollectionViewDataSo } else { cell.selectCell(didSelect: false) } - + let model = uploadedCourseList[indexPath.item] let cellTitle = "\(model.departure.region) \(model.departure.city)" cell.setData(imageURL: model.image, title: cellTitle, location: nil, didLike: nil, isEditMode: isEditMode) @@ -389,6 +389,8 @@ extension UploadedCourseInfoVC { extension UploadedCourseInfoVC: ListEmptyViewDelegate { func emptyViewButtonTapped() { + analyze(buttonName: GAEvent.Button.clickCourseUploadInUploadedCourse) + let myCourseSelectVC = MyCourseSelectVC() self.navigationController?.pushViewController(myCourseSelectVC, animated: true) diff --git a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/MyPageVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/MyPageVC.swift index b4918a8b..6d175464 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/MyPageVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/MyPageVC.swift @@ -231,16 +231,19 @@ extension MyPageVC { extension MyPageVC { @objc private func touchUpActivityRecordInfoView() { + analyze(buttonName: GAEvent.Button.clickRunningRecord) pushToActivityRecordInfoVC() } @objc private func touchUpGoalRewardInfoView() { + analyze(buttonName: GAEvent.Button.clickGoalReward) pushToGoalRewardInfoVC() } @objc private func touchUpUploadedCourseRecordInfoView() { + analyze(buttonName: GAEvent.Button.clickUploadedCourse) pushToUploadedCourseInfoVC() } 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 9aaab093..04d28bc1 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/SettingVC/PersonalInfoVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/SettingVC/PersonalInfoVC.swift @@ -63,11 +63,13 @@ final class PersonalInfoVC: UIViewController { extension PersonalInfoVC { @objc func touchUpLogoutView() { + analyze(buttonName: GAEvent.Button.clickTryLogout) pushToLogoutVC() } @objc func touchUpDeleteAccountView() { + analyze(buttonName: GAEvent.Button.clickTryWithdraw) pushToDeleteAccountVC() } } @@ -130,10 +132,12 @@ extension PersonalInfoVC { private func logout() { UserManager.shared.logout() + analyze(screenName: GAEvent.View.viewSuccessLogout) self.showSplashVC() } private func deleteUserDidComplete() { + analyze(screenName: GAEvent.View.viewSuccessWithdraw) self.logout() } From a863c63017fc1e4e85681e11bbea8510f5367f0b Mon Sep 17 00:00:00 2001 From: LeeMyeongJin Date: Tue, 16 Jan 2024 19:54:34 +0900 Subject: [PATCH 11/17] =?UTF-8?q?[Setting]=20#246=20-=20=EC=82=BC=ED=95=AD?= =?UTF-8?q?=20=EC=97=B0=EC=82=B0=EC=9E=90=20lint=20=EB=93=B1=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit void_function_in_ternary 를 disable 시켜 코드의 경고를 줄였습니다. --- Runnect-iOS/.swiftlint.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/Runnect-iOS/.swiftlint.yml b/Runnect-iOS/.swiftlint.yml index 05d158e0..bbe4a629 100644 --- a/Runnect-iOS/.swiftlint.yml +++ b/Runnect-iOS/.swiftlint.yml @@ -6,6 +6,7 @@ disabled_rules: - legacy_constructor - unused_setter_value - file_length + - void_function_in_ternary included: - Runnect-iOS From 7a6520eaf26744eb6734ff2acc372e689ba4316f Mon Sep 17 00:00:00 2001 From: LeeMyeongJin Date: Tue, 16 Jan 2024 19:56:39 +0900 Subject: [PATCH 12/17] =?UTF-8?q?[Fix]=20#246=20-=20Void=20=ED=95=A8?= =?UTF-8?q?=EC=88=98=20=EC=82=BC=ED=95=AD=20=EC=97=B0=EC=82=B0=EC=9E=90?= =?UTF-8?q?=EB=A5=BC=20if~else=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Presentation/SignIn/VC/SignInSocialLoginVC.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Runnect-iOS/Runnect-iOS/Presentation/SignIn/VC/SignInSocialLoginVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/SignIn/VC/SignInSocialLoginVC.swift index d5c69d92..b6511707 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/SignIn/VC/SignInSocialLoginVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/SignIn/VC/SignInSocialLoginVC.swift @@ -218,7 +218,11 @@ extension SignInSocialLoginVC: ASAuthorizationControllerPresentationContextProvi switch result { case .success(let type): self?.analyze(buttonName: GAEvent.Button.clickAppleLogin) - type == "Signup" ? self?.pushToNickNameSetUpVC() : self?.pushToTabBarController() + if type == "Signup" { + self?.pushToNickNameSetUpVC() + } else { + self?.pushToTabBarController() + } case .failure(let error): print(error) self?.showNetworkFailureToast() From 3367f136589c90abd7d476d9b3cdcb1b12993ebe Mon Sep 17 00:00:00 2001 From: LeeMyeongJin Date: Tue, 16 Jan 2024 20:00:12 +0900 Subject: [PATCH 13/17] =?UTF-8?q?[Refactor]=20#246=20-=20=EC=BD=94?= =?UTF-8?q?=EC=8A=A4=20=EA=B7=B8=EB=A6=AC=EA=B8=B0=20=EB=A0=88=EC=9D=B4?= =?UTF-8?q?=EC=95=84=EC=9B=83=20=ED=95=A8=EC=88=98=20=EB=B6=84=ED=95=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 레이아웃 함수가 너무 길어서 분류에 맞게 함수로 나눴습니다. --- .../CourseDrawing/VC/CourseDrawingVC.swift | 158 ++++++++++-------- .../Presentation/MyPage/VC/MyPageVC.swift | 8 +- .../MyPage/VC/SettingVC/PersonalInfoVC.swift | 40 +++-- 3 files changed, 115 insertions(+), 91 deletions(-) diff --git a/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingVC.swift index 4bfbdd1a..e61af314 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/CourseDrawing/VC/CourseDrawingVC.swift @@ -289,6 +289,77 @@ extension CourseDrawingVC { self.departureInfoContainerView.addSubviews(departureLocationLabel, departureDetailLocationLabel, decideDepartureButton) view.bringSubviewToFront(naviBarContainerStackView) + setNotchCoverViewLayout() + setNaviBarLayout() + setMapViewLayout() + setStartMarkStackViewLayout() + setDepartureInfoContainerViewLayout() + setAboutMapNoticeViewLayout() + } + + private func setHiddenViewsLayout() { + view.addSubviews(naviBarForEditing, guideView, distanceContainerView, completeButton, undoButton) + view.sendSubviewToBack(naviBarForEditing) + + naviBarForEditing.snp.makeConstraints { make in + make.leading.top.trailing.equalTo(view.safeAreaLayoutGuide) + make.height.equalTo(48) + } + + guideView.snp.makeConstraints { make in + make.centerY.equalTo(naviBarForEditing.snp.centerY) + make.leading.equalTo(view.safeAreaLayoutGuide).inset(55) + make.trailing.equalTo(view.safeAreaLayoutGuide).inset(27) + } + + distanceContainerView.snp.makeConstraints { make in + make.width.equalTo(96) + make.height.equalTo(44) + make.leading.equalTo(view.safeAreaLayoutGuide).inset(16) + make.top.equalTo(view.snp.bottom) + } + + distanceContainerView.addSubviews(distanceStackView) + + distanceStackView.snp.makeConstraints { make in + make.center.equalToSuperview() + } + + undoButton.snp.makeConstraints { make in + make.trailing.equalTo(view.safeAreaLayoutGuide) + make.top.equalTo(view.snp.bottom) + } + + completeButton.snp.makeConstraints { make in + make.leading.trailing.equalTo(view.safeAreaLayoutGuide).inset(16) + make.height.equalTo(44) + make.top.equalTo(view.snp.bottom).offset(34) + } + } + + private func showHiddenViews(withDuration: TimeInterval = 0) { + [naviBarForEditing, guideView, distanceContainerView, completeButton, undoButton].forEach { subView in + view.bringSubviewToFront(subView) + } + + UIView.animate(withDuration: withDuration) { + let naviBarContainerStackViewHeight = self.naviBarContainerStackView.frame.height + self.naviBarContainerStackView.transform = CGAffineTransform(translationX: 0, y: -naviBarContainerStackViewHeight) + self.departureInfoContainerView.transform = CGAffineTransform(translationX: 0, y: 172) + } + + self.guideView.transform = CGAffineTransform(translationX: 0, y: -100) + + UIView.animate(withDuration: withDuration) { + self.naviBarForEditing.alpha = 1 + self.guideView.transform = .identity + self.distanceContainerView.transform = CGAffineTransform(translationX: 0, y: -151) + self.completeButton.transform = CGAffineTransform(translationX: 0, y: -112) + self.undoButton.transform = CGAffineTransform(translationX: 0, y: -(self.undoButton.frame.height+95)) + } + } + + private func setNotchCoverViewLayout() { notchCoverView.snp.makeConstraints { make in var notchHeight = calculateTopInset() if notchHeight == -44 { @@ -297,7 +368,9 @@ extension CourseDrawingVC { } make.height.equalTo(-notchHeight) } - + } + + private func setNaviBarLayout() { naviBar.snp.makeConstraints { make in make.height.equalTo(56) } @@ -305,15 +378,20 @@ extension CourseDrawingVC { naviBarContainerStackView.snp.makeConstraints { make in make.leading.top.trailing.equalToSuperview() } - + } + + private func setMapViewLayout() { mapView.snp.makeConstraints { make in make.edges.equalToSuperview() } - + } + + private func setStartMarkStackViewLayout() { startLabelUIImage.snp.makeConstraints { make in make.height.equalTo(34) make.width.equalTo(58) } + startMarkUIImage.snp.makeConstraints { make in make.height.width.equalTo(65) } @@ -324,7 +402,9 @@ extension CourseDrawingVC { make.centerX.equalToSuperview() make.centerY.equalToSuperview().offset(-17) } - + } + + private func setDepartureInfoContainerViewLayout() { departureInfoContainerView.snp.makeConstraints { make in make.leading.bottom.trailing.equalToSuperview() make.height.equalTo(172) @@ -345,10 +425,12 @@ extension CourseDrawingVC { make.leading.trailing.equalToSuperview().inset(16) make.height.equalTo(44) } - + } + + private func setAboutMapNoticeViewLayout() { if SelectedInfo.shared.type == .map { - self.aboutMapNoticeView.addSubview(aboutMapNoticeLabel) - self.naviBarContainerStackView.addArrangedSubviews(underlineView, aboutMapNoticeView) + aboutMapNoticeView.addSubview(aboutMapNoticeLabel) + naviBarContainerStackView.addArrangedSubviews(underlineView, aboutMapNoticeView) underlineView.snp.makeConstraints { $0.leading.trailing.equalToSuperview() @@ -365,68 +447,6 @@ extension CourseDrawingVC { } } } - - private func setHiddenViewsLayout() { - view.addSubviews(naviBarForEditing, guideView, distanceContainerView, completeButton, undoButton) - view.sendSubviewToBack(naviBarForEditing) - - naviBarForEditing.snp.makeConstraints { make in - make.leading.top.trailing.equalTo(view.safeAreaLayoutGuide) - make.height.equalTo(48) - } - - guideView.snp.makeConstraints { make in - make.centerY.equalTo(naviBarForEditing.snp.centerY) - make.leading.equalTo(view.safeAreaLayoutGuide).inset(55) - make.trailing.equalTo(view.safeAreaLayoutGuide).inset(27) - } - - distanceContainerView.snp.makeConstraints { make in - make.width.equalTo(96) - make.height.equalTo(44) - make.leading.equalTo(view.safeAreaLayoutGuide).inset(16) - make.top.equalTo(view.snp.bottom) - } - - distanceContainerView.addSubviews(distanceStackView) - - distanceStackView.snp.makeConstraints { make in - make.center.equalToSuperview() - } - - undoButton.snp.makeConstraints { make in - make.trailing.equalTo(view.safeAreaLayoutGuide) - make.top.equalTo(view.snp.bottom) - } - - completeButton.snp.makeConstraints { make in - make.leading.trailing.equalTo(view.safeAreaLayoutGuide).inset(16) - make.height.equalTo(44) - make.top.equalTo(view.snp.bottom).offset(34) - } - } - - private func showHiddenViews(withDuration: TimeInterval = 0) { - [naviBarForEditing, guideView, distanceContainerView, completeButton, undoButton].forEach { subView in - view.bringSubviewToFront(subView) - } - - UIView.animate(withDuration: withDuration) { - let naviBarContainerStackViewHeight = self.naviBarContainerStackView.frame.height - self.naviBarContainerStackView.transform = CGAffineTransform(translationX: 0, y: -naviBarContainerStackViewHeight) - self.departureInfoContainerView.transform = CGAffineTransform(translationX: 0, y: 172) - } - - self.guideView.transform = CGAffineTransform(translationX: 0, y: -100) - - UIView.animate(withDuration: withDuration) { - self.naviBarForEditing.alpha = 1 - self.guideView.transform = .identity - self.distanceContainerView.transform = CGAffineTransform(translationX: 0, y: -151) - self.completeButton.transform = CGAffineTransform(translationX: 0, y: -112) - self.undoButton.transform = CGAffineTransform(translationX: 0, y: -(self.undoButton.frame.height+95)) - } - } } // MARK: - Network diff --git a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/MyPageVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/MyPageVC.swift index 6d175464..8dd77141 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/MyPageVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/MyPageVC.swift @@ -14,16 +14,16 @@ import KakaoSDKTalk import KakaoSDKUser final class MyPageVC: UIViewController { - + // MARK: - Properties private var userProvider = Providers.userProvider let stampNameImageDictionary: [String: UIImage] = GoalRewardInfoModel.stampNameImageDictionary - + var sendEmail = String() var sendNickname = String() - + // MARK: - UI Components private lazy var navibar = CustomNavigationBar(self, type: .title).setTitle("마이페이지") @@ -88,7 +88,7 @@ final class MyPageVC: UIViewController { let tap = UITapGestureRecognizer(target: self, action: #selector(self.touchUpUploadedCourseRecordInfoView)) $0.addGestureRecognizer(tap) } - + private lazy var settingView = makeInfoView(title: "설정").then { let tap = UITapGestureRecognizer(target: self, action: #selector(self.touchUpSettingView)) $0.addGestureRecognizer(tap) 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 04d28bc1..20fc0680 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/SettingVC/PersonalInfoVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/SettingVC/PersonalInfoVC.swift @@ -12,13 +12,13 @@ import SnapKit import Then final class PersonalInfoVC: UIViewController { - + // MARK: - Properties private let userProvider = Providers.userProvider var email = String() - + // MARK: - UI Components private lazy var navibar = CustomNavigationBar(self, type: .titleWithLeftButton).setTitle("계정 정보") @@ -64,12 +64,14 @@ extension PersonalInfoVC { @objc func touchUpLogoutView() { analyze(buttonName: GAEvent.Button.clickTryLogout) + pushToLogoutVC() } @objc func touchUpDeleteAccountView() { analyze(buttonName: GAEvent.Button.clickTryWithdraw) + pushToDeleteAccountVC() } } @@ -133,18 +135,20 @@ extension PersonalInfoVC { private func logout() { UserManager.shared.logout() analyze(screenName: GAEvent.View.viewSuccessLogout) + self.showSplashVC() } private func deleteUserDidComplete() { analyze(screenName: GAEvent.View.viewSuccessWithdraw) + self.logout() } private func requestAppleToken() { let appleIDProvider = ASAuthorizationAppleIDProvider() let request = appleIDProvider.createRequest() - + let authorizationController = ASAuthorizationController(authorizationRequests: [request]) authorizationController.delegate = self authorizationController.presentationContextProvider = self @@ -291,21 +295,21 @@ extension PersonalInfoVC: ASAuthorizationControllerPresentationContextProviding, /// Apple ID 연동 성공 시 func authorizationController(controller: ASAuthorizationController, didCompleteWithAuthorization authorization: ASAuthorization) { - switch authorization.credential { - /// Apple ID - case let appleIDCredential as ASAuthorizationAppleIDCredential: - - /// 계정 정보 가져오기 - let userIdentifier = appleIDCredential.user - let idToken = appleIDCredential.identityToken! - guard let tokenStr = String(data: idToken, encoding: .utf8) else { return } - - print("User ID : \(userIdentifier)") - print("token : \(String(describing: tokenStr))") - - self.deleteUser(appleToken: tokenStr) - default: - break + switch authorization.credential { + /// Apple ID + case let appleIDCredential as ASAuthorizationAppleIDCredential: + + /// 계정 정보 가져오기 + let userIdentifier = appleIDCredential.user + let idToken = appleIDCredential.identityToken! + guard let tokenStr = String(data: idToken, encoding: .utf8) else { return } + + print("User ID : \(userIdentifier)") + print("token : \(String(describing: tokenStr))") + + self.deleteUser(appleToken: tokenStr) + default: + break } } From 8dfd99c0e602bb4e9495b262d1044095f885f99b Mon Sep 17 00:00:00 2001 From: LeeMyeongJin Date: Tue, 16 Jan 2024 20:32:07 +0900 Subject: [PATCH 14/17] =?UTF-8?q?[Refactor]=20#246=20-=20UIGestureRecogniz?= =?UTF-8?q?er+=20=EC=A4=91=EC=B2=A9=20=ED=83=80=EC=9E=85=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit extension 에서 중첩 타입 으로 처리한 부분이 의미가 없다고 생각해서 수정 하였습니다. --- .../UIKit+/UIGestureRecognizer+.swift | 93 ++++++++++--------- 1 file changed, 49 insertions(+), 44 deletions(-) diff --git a/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIGestureRecognizer+.swift b/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIGestureRecognizer+.swift index 027a8bda..a9ae72da 100644 --- a/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIGestureRecognizer+.swift +++ b/Runnect-iOS/Runnect-iOS/Global/Extension/UIKit+/UIGestureRecognizer+.swift @@ -15,6 +15,7 @@ enum GestureType { case pan(UIPanGestureRecognizer = .init()) case pinch(UIPinchGestureRecognizer = .init()) case edge(UIScreenEdgePanGestureRecognizer = .init()) + func get() -> UIGestureRecognizer { switch self { case let .tap(tapGesture): @@ -33,51 +34,55 @@ enum GestureType { } } -extension UIGestureRecognizer { - struct GesturePublisher: Publisher { - typealias Output = GestureType - typealias Failure = Never - private let view: UIView - private let gestureType: GestureType - init(view: UIView, gestureType: GestureType) { - self.view = view - self.gestureType = gestureType - } - - func receive(subscriber: S) where S: Subscriber, - GesturePublisher.Failure == S.Failure, - GesturePublisher.Output == S.Input { - let subscription = GestureSubscription( - subscriber: subscriber, - view: view, - gestureType: gestureType - ) - subscriber.receive(subscription: subscription) - } +struct GesturePublisher: Publisher { + typealias Output = GestureType + typealias Failure = Never + + private let view: UIView + private let gestureType: GestureType + + init(view: UIView, gestureType: GestureType) { + self.view = view + self.gestureType = gestureType } - class GestureSubscription: Subscription where S.Input == GestureType, S.Failure == Never { - private var subscriber: S? - private var gestureType: GestureType - private var view: UIView - init(subscriber: S, view: UIView, gestureType: GestureType) { - self.subscriber = subscriber - self.view = view - self.gestureType = gestureType - configureGesture(gestureType) - } - private func configureGesture(_ gestureType: GestureType) { - let gesture = gestureType.get() - gesture.addTarget(self, action: #selector(handler)) - view.addGestureRecognizer(gesture) - } - func request(_ demand: Subscribers.Demand) { } - func cancel() { - subscriber = nil - } - @objc - private func handler() { - _ = subscriber?.receive(gestureType) - } + func receive(subscriber: S) where S: Subscriber, + Failure == S.Failure, + Output == S.Input { + let subscription = GestureSubscription( + subscriber: subscriber, + view: view, + gestureType: gestureType + ) + subscriber.receive(subscription: subscription) + } +} + +class GestureSubscription: Subscription where S.Input == GestureType, S.Failure == Never { + private var subscriber: S? + private var gestureType: GestureType + private var view: UIView + + init(subscriber: S, view: UIView, gestureType: GestureType) { + self.subscriber = subscriber + self.view = view + self.gestureType = gestureType + configureGesture(gestureType) + } + + func request(_ demand: Subscribers.Demand) { } + + func cancel() { + subscriber = nil + } + + private func configureGesture(_ gestureType: GestureType) { + let gesture = gestureType.get() + gesture.addTarget(self, action: #selector(handler)) + view.addGestureRecognizer(gesture) + } + + @objc private func handler() { + _ = subscriber?.receive(gestureType) } } From 04278b51ac6098e3d37b8670166cac71ebd8b539 Mon Sep 17 00:00:00 2001 From: LeeMyeongJin Date: Tue, 16 Jan 2024 20:35:10 +0900 Subject: [PATCH 15/17] =?UTF-8?q?[Fix]=20#246=20-=20Swift=20=EA=B6=8C?= =?UTF-8?q?=EC=9E=A5=20=EC=82=AC=EC=96=91=EC=97=90=20=EB=A7=9E=EA=B2=8C=20?= =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EB=B3=80=EA=B2=BD=20=ED=95=98=EC=98=80?= =?UTF-8?q?=EC=8A=B5=EB=8B=88=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Array --> [Double] --- .../Runnect-iOS/Global/UIComponents/MapView/RNMapView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runnect-iOS/Runnect-iOS/Global/UIComponents/MapView/RNMapView.swift b/Runnect-iOS/Runnect-iOS/Global/UIComponents/MapView/RNMapView.swift index 1f72ab51..f9862441 100644 --- a/Runnect-iOS/Runnect-iOS/Global/UIComponents/MapView/RNMapView.swift +++ b/Runnect-iOS/Runnect-iOS/Global/UIComponents/MapView/RNMapView.swift @@ -19,7 +19,7 @@ final class RNMapView: UIView { @Published var pathDistance: Double = 0 @Published var markerCount = 0 - var eventSubject = PassthroughSubject, Never>() + var eventSubject = PassthroughSubject<[Double], Never>() private let screenWidth = UIScreen.main.bounds.width private let screenHeight = UIScreen.main.bounds.height From 7bc800fc1a7e030a813b84ce7894ac4904d35f93 Mon Sep 17 00:00:00 2001 From: LeeMyeongJin Date: Tue, 16 Jan 2024 20:47:06 +0900 Subject: [PATCH 16/17] =?UTF-8?q?[Fix]=20#246=20-=20=EC=B9=B4=EC=B9=B4?= =?UTF-8?q?=EC=98=A4=20SDK=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=EB=A1=9C?= =?UTF-8?q?=20=EC=9D=B8=ED=95=9C=20=ED=95=A8=EC=88=98=EB=AA=85=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 기존 것이 deprecated 돼서 카카오 SDK 지침에 따라 변경 --- Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/MyPageVC.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/MyPageVC.swift b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/MyPageVC.swift index 8dd77141..5f9ad7a5 100644 --- a/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/MyPageVC.swift +++ b/Runnect-iOS/Runnect-iOS/Presentation/MyPage/VC/MyPageVC.swift @@ -259,7 +259,7 @@ extension MyPageVC { @objc private func touchUpkakaoChannelAsk() { - if let url = TalkApi.shared.makeUrlForChannelChat(channelPublicId: "_hXduG") { + if let url = TalkApi.shared.makeUrlForChatChannel(channelPublicId: "_hXduG") { UIApplication.shared.open(url) } } From b8e3e1e3d92555a205929a73537016d38b534157 Mon Sep 17 00:00:00 2001 From: LeeMyeongJin Date: Tue, 16 Jan 2024 22:00:12 +0900 Subject: [PATCH 17/17] =?UTF-8?q?[Setting]=20#246=20-=20fastlane=20team=5F?= =?UTF-8?q?id=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 8Q4H7X3Q58 로 변경 --- Runnect-iOS/fastlane/Appfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runnect-iOS/fastlane/Appfile b/Runnect-iOS/fastlane/Appfile index 82aa07e8..83428cd7 100644 --- a/Runnect-iOS/fastlane/Appfile +++ b/Runnect-iOS/fastlane/Appfile @@ -2,7 +2,7 @@ app_identifier("com.runnect.Runnect-iOS") # The bundle identifier of your app apple_id(ENV["APPLE_ID"]) # Your Apple Developer Portal username itc_team_id("125287287") # App Store Connect Team ID -team_id("9K86FQHDLU") # Developer Portal Team ID +team_id("8Q4H7X3Q58") # Developer Portal Team ID # For more information about the Appfile, see: # https://docs.fastlane.tools/advanced/#appfile