Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] 시작이 되지 않는 현상 수정 #310

Merged
merged 6 commits into from
Dec 13, 2023
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,12 @@ public final class HomeViewModel {

private extension HomeViewModel {

private var shouldSignIn: Bool {
return self.isFirstLaunch || self.userRepository.fetchUUID() == nil
}

func createNewUserWhenFirstLaunch() {
guard self.isFirstLaunch else { return }
guard self.shouldSignIn else { return }

Task {
let result = await self.userRepository.createUser()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extension MSKeychainStorage {

public enum Accounts: String, CaseIterable {

case userID
case userID = "MusicSpotUser.v1"

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import UIKit

import MSDesignSystem
import MSExtension
import MSImageFetcher

public final class JourneyCell: UICollectionViewCell {
Expand Down Expand Up @@ -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())
}

}
Expand Down
18 changes: 9 additions & 9 deletions iOS/MusicSpot/MusicSpot/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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("키체인 초기화 실패")
}
}

}
Expand Down