From 5845335a966e7e40d2b9105c080d5f824555b1bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Junnos=20=EF=A3=BF?= Date: Tue, 12 Dec 2023 20:08:57 +0900 Subject: [PATCH 1/4] =?UTF-8?q?:bug:=20=EC=95=B1=20=EC=B2=AB=20=EC=8B=A4?= =?UTF-8?q?=ED=96=89=EC=9D=B4=20=EC=95=84=EB=8B=90=20=EC=8B=9C=20=EC=9C=A0?= =?UTF-8?q?=EC=A0=80=EA=B0=80=20=EC=97=86=EC=9D=84=EB=95=8C=EB=8F=84=20?= =?UTF-8?q?=EC=9C=A0=EC=A0=80=EB=A5=BC=20=EC=83=9D=EC=84=B1=ED=95=98?= =?UTF-8?q?=EC=A7=80=20=EC=95=8A=EB=8A=94=20=EB=AC=B8=EC=A0=9C=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 --- .../Home/Sources/Home/Presentation/HomeViewModel.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iOS/Features/Home/Sources/Home/Presentation/HomeViewModel.swift b/iOS/Features/Home/Sources/Home/Presentation/HomeViewModel.swift index 9518e06..1b448b1 100644 --- a/iOS/Features/Home/Sources/Home/Presentation/HomeViewModel.swift +++ b/iOS/Features/Home/Sources/Home/Presentation/HomeViewModel.swift @@ -104,7 +104,9 @@ public final class HomeViewModel { private extension HomeViewModel { func createNewUserWhenFirstLaunch() { - guard self.isFirstLaunch else { return } + if !self.isFirstLaunch, self.userRepository.fetchUUID() != nil { + return + } Task { let result = await self.userRepository.createUser() From a083b8c7db72bfda63dfc976fd40659439264abe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Junnos=20=EF=A3=BF?= Date: Tue, 12 Dec 2023 20:16:00 +0900 Subject: [PATCH 2/4] =?UTF-8?q?:art:=20=EC=9C=A0=EC=A0=80=20=EC=83=9D?= =?UTF-8?q?=EC=84=B1=20=EC=A1=B0=EA=B1=B4=20=EA=B3=84=EC=82=B0=20=ED=94=84?= =?UTF-8?q?=EB=A1=9C=ED=8D=BC=ED=8B=B0=ED=99=94=20&=20=ED=82=A4=EC=B2=B4?= =?UTF-8?q?=EC=9D=B8=20=EC=9C=A0=EC=A0=80=20Key=EA=B0=92=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 --- .../Home/Sources/Home/Presentation/HomeViewModel.swift | 8 +++++--- .../MSKeychainStorage/MSKeychainStorage+Constants.swift | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/iOS/Features/Home/Sources/Home/Presentation/HomeViewModel.swift b/iOS/Features/Home/Sources/Home/Presentation/HomeViewModel.swift index 1b448b1..236bf66 100644 --- a/iOS/Features/Home/Sources/Home/Presentation/HomeViewModel.swift +++ b/iOS/Features/Home/Sources/Home/Presentation/HomeViewModel.swift @@ -103,10 +103,12 @@ public final class HomeViewModel { private extension HomeViewModel { + private var shouldSignIn: Bool { + return self.isFirstLaunch && self.userRepository.fetchUUID() == nil + } + func createNewUserWhenFirstLaunch() { - if !self.isFirstLaunch, self.userRepository.fetchUUID() != nil { - return - } + guard self.shouldSignIn else { return } Task { let result = await self.userRepository.createUser() diff --git a/iOS/MSCoreKit/Sources/MSKeychainStorage/MSKeychainStorage+Constants.swift b/iOS/MSCoreKit/Sources/MSKeychainStorage/MSKeychainStorage+Constants.swift index 1c3dfb1..df59054 100644 --- a/iOS/MSCoreKit/Sources/MSKeychainStorage/MSKeychainStorage+Constants.swift +++ b/iOS/MSCoreKit/Sources/MSKeychainStorage/MSKeychainStorage+Constants.swift @@ -17,7 +17,7 @@ extension MSKeychainStorage { public enum Accounts: String, CaseIterable { - case userID + case userID = "MusicSpotUser.v1" } From 615202618ecb2204f0b841863710640c5c1437ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Junnos=20=EF=A3=BF?= Date: Tue, 12 Dec 2023 21:32:13 +0900 Subject: [PATCH 3/4] =?UTF-8?q?:bug:=20=EC=9C=A0=EC=A0=80=20=EA=B2=80?= =?UTF-8?q?=EC=82=AC=20AND=20=E2=9E=A1=EF=B8=8F=20OR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iOS/Features/Home/Sources/Home/Presentation/HomeViewModel.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iOS/Features/Home/Sources/Home/Presentation/HomeViewModel.swift b/iOS/Features/Home/Sources/Home/Presentation/HomeViewModel.swift index 236bf66..45d3d61 100644 --- a/iOS/Features/Home/Sources/Home/Presentation/HomeViewModel.swift +++ b/iOS/Features/Home/Sources/Home/Presentation/HomeViewModel.swift @@ -104,7 +104,7 @@ public final class HomeViewModel { private extension HomeViewModel { private var shouldSignIn: Bool { - return self.isFirstLaunch && self.userRepository.fetchUUID() == nil + return self.isFirstLaunch || self.userRepository.fetchUUID() == nil } func createNewUserWhenFirstLaunch() { From f2484751c5da123928cee30254e8b34cd99e617d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Junnos=20=EF=A3=BF?= Date: Tue, 12 Dec 2023 22:43:43 +0900 Subject: [PATCH 4/4] =?UTF-8?q?:bug:=20=EC=97=AC=EC=A0=95=20=EB=AA=A9?= =?UTF-8?q?=EB=A1=9D=20=EC=BA=90=EC=8B=B1=20=EB=B2=84=EA=B7=B8=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 --- .../Common/MapViewController.swift | 6 +----- .../Cells/JourneyCell/JourneyCell.swift | 4 ++-- iOS/MusicSpot/MusicSpot/SceneDelegate.swift | 18 +++++++++--------- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/iOS/Features/Home/Sources/NavigateMap/Presentation/Common/MapViewController.swift b/iOS/Features/Home/Sources/NavigateMap/Presentation/Common/MapViewController.swift index edcf843..fece4c9 100644 --- a/iOS/Features/Home/Sources/NavigateMap/Presentation/Common/MapViewController.swift +++ b/iOS/Features/Home/Sources/NavigateMap/Presentation/Common/MapViewController.swift @@ -250,11 +250,7 @@ public final class MapViewController: UIViewController { CLLocationCoordinate2D(latitude: $0.latitude, longitude: $0.longitude) } - let spotCoordinates = journey.spots.map { - CLLocationCoordinate2D(latitude: $0.coordinate.latitude, - longitude: $0.coordinate.longitude) - } - await self.drawPolylineToMap(using: coordinates+spotCoordinates) + await self.drawPolylineToMap(using: coordinates) } } } diff --git a/iOS/MSUIKit/Sources/MSUIKit/Cells/JourneyCell/JourneyCell.swift b/iOS/MSUIKit/Sources/MSUIKit/Cells/JourneyCell/JourneyCell.swift index 4b5b148..73d2cd3 100644 --- a/iOS/MSUIKit/Sources/MSUIKit/Cells/JourneyCell/JourneyCell.swift +++ b/iOS/MSUIKit/Sources/MSUIKit/Cells/JourneyCell/JourneyCell.swift @@ -8,6 +8,7 @@ import UIKit import MSDesignSystem +import MSExtension import MSImageFetcher public final class JourneyCell: UICollectionViewCell { @@ -96,8 +97,7 @@ public final class JourneyCell: UICollectionViewCell { return } - let key = "\(indexPath.section)-\(indexPath.item)" - photoView.imageView.ms.setImage(with: imageURL, forKey: key) + photoView.imageView.ms.setImage(with: imageURL, forKey: imageURL.paath()) } } diff --git a/iOS/MusicSpot/MusicSpot/SceneDelegate.swift b/iOS/MusicSpot/MusicSpot/SceneDelegate.swift index 4956c04..da7a457 100644 --- a/iOS/MusicSpot/MusicSpot/SceneDelegate.swift +++ b/iOS/MusicSpot/MusicSpot/SceneDelegate.swift @@ -81,15 +81,15 @@ import MSKeychainStorage private extension SceneDelegate { func prepareToDebug() { -// self.isFirstLaunch = true -// self.recordingJourneyID = nil -// self.isRecording = false -// -// do { -// try self.keychain.deleteAll() -// } catch { -// MSLogger.make(category: .keychain).error("키체인 초기화 실패") -// } + self.isFirstLaunch = true + self.recordingJourneyID = nil + self.isRecording = false + + do { + try self.keychain.deleteAll() + } catch { + MSLogger.make(category: .keychain).error("키체인 초기화 실패") + } } }