From 6cf58249c4bd65c480d14a4eb78c8854adf6291d Mon Sep 17 00:00:00 2001 From: Xerath Date: Mon, 11 Dec 2023 12:36:20 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=E2=9C=A8=20=EC=8B=A4=EC=8B=9C=EA=B0=84=20?= =?UTF-8?q?=EA=B8=B0=EB=A1=9D=20=EC=8B=9C=20=EC=9C=84=EC=B9=98=20=EB=B3=B4?= =?UTF-8?q?=EC=A0=95=20=EB=A1=9C=EC=A7=81=20=EC=9E=AC=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Presentation/Common/MapViewController.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/iOS/Features/Home/Sources/NavigateMap/Presentation/Common/MapViewController.swift b/iOS/Features/Home/Sources/NavigateMap/Presentation/Common/MapViewController.swift index 371b5c4..680ab23 100644 --- a/iOS/Features/Home/Sources/NavigateMap/Presentation/Common/MapViewController.swift +++ b/iOS/Features/Home/Sources/NavigateMap/Presentation/Common/MapViewController.swift @@ -315,6 +315,12 @@ extension MapViewController: CLLocationManagerDelegate { let recordJourneyViewModel = self.viewModel as? RecordJourneyViewModel else { return } + let previousCoordinate = (self.viewModel as? RecordJourneyViewModel)?.state.previousCoordinate.value + if self.timeRemaining != 0 || viewModel is NavigateMapViewModel { return } + if let previousCoordinate { + if !self.isDistanceOver5AndUnder50(coordinate1: previousCoordinate, + coordinate2: newCurrentLocation.coordinate) { return } + } let coordinate2D = CLLocationCoordinate2D(latitude: newCurrentLocation.coordinate.latitude, longitude: newCurrentLocation.coordinate.longitude) @@ -365,6 +371,7 @@ extension MapViewController: CLLocationManagerDelegate { coordinate2: CLLocationCoordinate2D) -> Bool { let location1 = CLLocation(latitude: coordinate1.latitude, longitude: coordinate1.longitude) let location2 = CLLocation(latitude: coordinate2.latitude, longitude: coordinate2.longitude) + MSLogger.make(category: .navigateMap).log("이동한 거리: \(location1.distance(from: location2))") return 5 <= location1.distance(from: location2) && location1.distance(from: location2) <= 50 } From 56f5b678205b8208fa334f472bca3882c8940044 Mon Sep 17 00:00:00 2001 From: Xerath Date: Mon, 11 Dec 2023 12:36:41 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=8E=A8=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20=EB=9D=BC=EC=9D=B8=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iOS/MusicSpot/MusicSpot/SceneDelegate.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/iOS/MusicSpot/MusicSpot/SceneDelegate.swift b/iOS/MusicSpot/MusicSpot/SceneDelegate.swift index 4d5ebd4..47807d4 100644 --- a/iOS/MusicSpot/MusicSpot/SceneDelegate.swift +++ b/iOS/MusicSpot/MusicSpot/SceneDelegate.swift @@ -71,7 +71,6 @@ private extension SceneDelegate { } - // MARK: - Debug #if DEBUG From 684be9b2465e8930bffbddb1c5516ce73e5092cb Mon Sep 17 00:00:00 2001 From: Xerath Date: Mon, 11 Dec 2023 23:49:27 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=90=9B=20Debug=20Scheme=20=EB=82=B4?= =?UTF-8?q?=EC=97=90=EC=84=9C=EB=A7=8C=20=EC=9E=91=EB=8F=99=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=EC=97=90=EB=9F=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iOS/MusicSpot/MusicSpot/SceneDelegate.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iOS/MusicSpot/MusicSpot/SceneDelegate.swift b/iOS/MusicSpot/MusicSpot/SceneDelegate.swift index 33a9139..a5b7138 100644 --- a/iOS/MusicSpot/MusicSpot/SceneDelegate.swift +++ b/iOS/MusicSpot/MusicSpot/SceneDelegate.swift @@ -12,6 +12,7 @@ import MSConstants import MSData import MSDesignSystem import MSLogger +import MSUserDefaults class SceneDelegate: UIResponder, UIWindowSceneDelegate { @@ -20,7 +21,6 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { var window: UIWindow? private var appCoordinator: Coordinator! - #if DEBUG @UserDefaultsWrapped(UserDefaultsKey.recordingJourneyID, defaultValue: nil) var recordingJourneyID: String? @UserDefaultsWrapped(UserDefaultsKey.isFirstLaunch, defaultValue: false) @@ -28,6 +28,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate { @UserDefaultsWrapped(UserDefaultsKey.isRecording, defaultValue: false) var isRecording: Bool + #if DEBUG var keychain = MSKeychainStorage() #endif @@ -76,7 +77,6 @@ private extension SceneDelegate { #if DEBUG import MSKeychainStorage -import MSUserDefaults private extension SceneDelegate {