diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md
new file mode 100644
index 0000000..5a3d8c8
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/issue_template.md
@@ -0,0 +1,18 @@
+---
+name: ISSUE_TEMPLATE
+about: 공통적으로 사용되는 이슈 템플릿
+title: ''
+labels: ''
+assignees: ''
+
+---
+
+## 📋 설명
+
+- 이슈에서 구현할 내용 작성
+
+## ✅ 체크리스트
+
+> 구현해야하는 이슈 체크리스트
+- [ ] 구현되지 않은 내용
+- [x] 구현 완료된 내용
diff --git a/README.md b/README.md
index a950ba8..bbe72c5 100644
--- a/README.md
+++ b/README.md
@@ -1,12 +1,9 @@
-
-
-
- 🎶 MusicSpot
-
-
+
+
+
+***
- 당신의 여정을 음악과 함께 기억하다.
네이버 부스트캠프 웹・모바일 8기 그룹 프로젝트
2023.11.06 ~ 2023.12.15
@@ -15,26 +12,76 @@
- ⭐️ 프로젝트 소개
+ ⭐️ 프로젝트 소개 ⭐
Team.과열은 지도에 관심을 갖고있는 사람들로 이루어져 있습니다.
- 지도를 활용해서 음악과 함께 여정을 기록하는 앱, MusicSpot를 소개합니다.
+ 여정동안 사진과 음악으로 지도에 흔적을 남기는 앱, MusicSpot을 소개합니다.
## 🔥 Team. 과열 🔥
-|S023 윤동주|S034 전민건|S045 이창준|J037 김태우|J131 임정훈|
+| S023 윤동주 | S034 전민건 | S045 이창준 | J037 김태우 | J131 임정훈 |
|:-:|:-:|:-:|:-:|:-:|
||||||
|[@yoondj98](https://github.com/yoondj98)|[@PushedGun](https://github.com/PushedGun)|[@SwiftyJunnos](https://github.com/SwiftyJunnos)|[@twoo1999](https://github.com/twoo1999)|[@vvans](https://github.com/vvans)|
+## 🗺️ 주요 기능
+### 🏃♂️ 여정 기록
+![MusicSpot 앱 소개 001](https://github.com/boostcampwm2023/iOS01-MusicSpot/assets/138548400/d8e6663e-ed95-4757-858c-2cead6dfa02c)
+
+### 📸 스팟!
+![MusicSpot 앱 소개 002](https://github.com/boostcampwm2023/iOS01-MusicSpot/assets/138548400/f9deb9f5-49c1-4f24-b692-0ea3016bf910)
+
+### 🎶 음악 추가
+![MusicSpot 앱 소개 003](https://github.com/boostcampwm2023/iOS01-MusicSpot/assets/138548400/22766d78-380d-4d9d-b3ab-a105b7835854)
+
+### 🌠 지난 여정
+![MusicSpot 앱 소개 004](https://github.com/boostcampwm2023/iOS01-MusicSpot/assets/138548400/06e129ea-7883-4c98-a39f-41867df2bb0f)
+
+## 🧰 기술 스택
+
+### iOS
+
+
+
+### BE
+
+
+
+## 🚀 기술적 도전기
+
+### 🍎 iOS
+| 키워드 | 제목 |
+| :-: | :- |
+| XCFramework, Package | [📦 라이브러리-프레임워크-패키지 무슨 차이인데?](https://www.nomatterjun.vision/blog/Swift/22.Library_Framework_Package) |
+| `URLProtocol` | [🌐 네트워킹이 테스트가 된다고!?](https://www.nomatterjun.vision/blog/Swift/23.URLProtocol) |
+| GitHub Actions, matrix | [🏭 모듈로 나뉜 구조에서 CI는 어떤 형태이면 좋을까?](https://www.nomatterjun.vision/blog/Swift/24.MusicSpot_CI) |
+| Boundary Model, Domain Layer | [🎫 데이터 입국심사가 너무 어려워요!](https://www.nomatterjun.vision/blog/Swift/25.DomainLayer) |
+| `*codingContainer`, `Codable` | [🕺 인코딩, 디코딩 예민하네~ 화났네~](https://www.nomatterjun.vision/blog/Swift/26.DecodingContainer) |
+| 추상화 | [🧑🔧 추상화로 협업하기](https://www.nomatterjun.vision/blog/Swift/27.Abstraction_Coop) |
+
+### 💾 BE
+| 키워드 | 제목 |
+| :-: | :- |
+| `NoSQL` | [ NoSQL이 뭐야?](https://www.notion.so/musicspot/NoSQL-16c8fa4b1ff84f86a321c87aa66e1504) |
+| `DocumentDB`, `MongoDB` | [ 너무 자유로운 구조는 초보 개발자를 불안하게 해요!](https://www.notion.so/musicspot/03e6b9a70d7f4097b3256c19b8098b85) |
+| `CI/CD`, `Docker` | [ Docker(???: 이미지 저장하는거 아니야?) ](https://www.notion.so/musicspot/Docker-121ba909e2e240dc94f25ac88c38a516) |
+| `CI/CD`,`Docker` | [ Docker와 친해지기 ](https://www.notion.so/musicspot/Docker-6a845439466f431ea4281fc09d938648) |
+| `SSH 연결`, '트러블 슈팅' | [ SSH연결이 안 돼요(근데 잘 돼요 ](https://www.notion.so/musicspot/ssh-fb93c27023e0406bb9bde19d661a6f4c) |
+| `HTTP`, `HTTPS`, `CA` | [ HTTPS(선택이 아닌 필수…!) ](https://www.notion.so/musicspot/HTTPS-244427527b894f85938ab6f1d3a19bc9) |
+| `Domain`, `가비아` | [ 도메인 사기(전세 사기의 그 사기 아님) ](https://www.notion.so/musicspot/8dd48b218be042fcbb9237aff9bc32fe) |
+| `HTTPS`, `NGINX`, `프록시` | [ Nginx를 통한 HTTPS연결 ](https://www.notion.so/musicspot/Nginx-HTTPS-bcf75adc83bb414089c697ddf9d6e97b) |
+| `CI/CD`, `github action` | [ github action 시작합니다. ](https://www.notion.so/musicspot/github-action-687b4b951adf4e83a1564d06a366ffbb) |
+
+
+
## 📔 문서
| 그라운드 룰 | 기획/디자인 | 템플릿 | 회의록 |
diff --git a/iOS/Features/Home/Package.swift b/iOS/Features/Home/Package.swift
index 71aeb42..8275bc7 100644
--- a/iOS/Features/Home/Package.swift
+++ b/iOS/Features/Home/Package.swift
@@ -32,8 +32,6 @@ private enum Dependency {
static let msDomain = "MSDomain"
static let msData = "MSData"
static let msUIKit = "MSUIKit"
- static let msKeychainStorage = "MSKeychainStorage"
- static let msCoreKit = "MSCoreKit"
static let msUserDefaults = "MSUserDefaults"
static let msLogger = "MSLogger"
static let msFoundation = "MSFoundation"
@@ -62,8 +60,6 @@ let package = Package(
path: Dependency.msData.fromRootPath),
.package(name: Dependency.msUIKit,
path: Dependency.msUIKit.fromRootPath),
- .package(name: Dependency.msCoreKit,
- path: Dependency.msCoreKit.fromRootPath),
.package(name: Dependency.msFoundation,
path: Dependency.msFoundation.fromRootPath)
],
@@ -77,8 +73,6 @@ let package = Package(
package: Dependency.msDomain),
.product(name: Dependency.msData,
package: Dependency.msData),
- .product(name: Dependency.msKeychainStorage,
- package: Dependency.msCoreKit),
.product(name: Dependency.msUserDefaults,
package: Dependency.msFoundation),
.product(name: Dependency.msLogger,
diff --git a/iOS/Features/Home/Sources/Home/Presentation/HomeViewModel.swift b/iOS/Features/Home/Sources/Home/Presentation/HomeViewModel.swift
index 45d3d61..106b9d8 100644
--- a/iOS/Features/Home/Sources/Home/Presentation/HomeViewModel.swift
+++ b/iOS/Features/Home/Sources/Home/Presentation/HomeViewModel.swift
@@ -12,9 +12,6 @@ import MSConstants
import MSData
import MSDomain
import MSImageFetcher
-#if DEBUG
-import MSKeychainStorage
-#endif
import MSLogger
import MSUserDefaults
@@ -48,10 +45,6 @@ public final class HomeViewModel {
private var journeyRepository: JourneyRepository
private let userRepository: UserRepository
- #if DEBUG
- private let keychain = MSKeychainStorage()
- #endif
-
@UserDefaultsWrapped(UserDefaultsKey.isFirstLaunch, defaultValue: false)
private var isFirstLaunch: Bool
diff --git a/iOS/Features/JourneyList/Package.swift b/iOS/Features/JourneyList/Package.swift
index deef4df..63c7311 100644
--- a/iOS/Features/JourneyList/Package.swift
+++ b/iOS/Features/JourneyList/Package.swift
@@ -23,11 +23,10 @@ private enum Target {
private enum Dependency {
- static let msCacheStorage = "MSCacheStorage"
- static let msImageFetcher = "MSImageFetcher"
- static let msCoreKit = "MSCoreKit"
- static let msUIKit = "MSUIKit"
static let msData = "MSData"
+
+ static let msUIKit = "MSUIKit"
+
static let msLogger = "MSLogger"
static let msFoundation = "MSFoundation"
@@ -45,22 +44,16 @@ let package = Package(
targets: [Target.journeyList])
],
dependencies: [
- .package(name: Dependency.msUIKit,
- path: Dependency.msUIKit.fromRootPath),
- .package(name: Dependency.msCoreKit,
- path: Dependency.msCoreKit.fromRootPath),
.package(name: Dependency.msData,
path: Dependency.msData.fromRootPath),
+ .package(name: Dependency.msUIKit,
+ path: Dependency.msUIKit.fromRootPath),
.package(name: Dependency.msFoundation,
path: Dependency.msFoundation.fromRootPath)
],
targets: [
.target(name: Target.journeyList,
dependencies: [
- .product(name: Dependency.msCacheStorage,
- package: Dependency.msCoreKit),
- .product(name: Dependency.msImageFetcher,
- package: Dependency.msCoreKit),
.product(name: Dependency.msUIKit,
package: Dependency.msUIKit),
.product(name: Dependency.msData,
diff --git a/iOS/Features/JourneyList/Sources/JourneyList/Presentation/JourneyListViewController.swift b/iOS/Features/JourneyList/Sources/JourneyList/Presentation/JourneyListViewController.swift
index d673682..87acb43 100644
--- a/iOS/Features/JourneyList/Sources/JourneyList/Presentation/JourneyListViewController.swift
+++ b/iOS/Features/JourneyList/Sources/JourneyList/Presentation/JourneyListViewController.swift
@@ -8,7 +8,6 @@
import Combine
import UIKit
-import MSCacheStorage
import MSData
import MSDomain
import MSUIKit
@@ -42,8 +41,6 @@ public final class JourneyListViewController: BaseViewController {
public weak var navigationDelegate: JourneyListNavigationDelegate?
- private let cache: MSCacheStorage
-
private(set) var viewModel: JourneyListViewModel
private var dataSource: JourneyListDataSource?
@@ -67,11 +64,9 @@ public final class JourneyListViewController: BaseViewController {
// MARK: - Initializer
public init(viewModel: JourneyListViewModel,
- cache: MSCacheStorage = MSCacheStorage(),
nibName nibNameOrNil: String? = nil,
bundle nibBundleOrNil: Bundle? = nil) {
self.viewModel = viewModel
- self.cache = cache
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
}
diff --git a/iOS/Features/RewindJourney/Package.swift b/iOS/Features/RewindJourney/Package.swift
index 0d75526..4441dc9 100644
--- a/iOS/Features/RewindJourney/Package.swift
+++ b/iOS/Features/RewindJourney/Package.swift
@@ -29,10 +29,11 @@ private enum Dependency {
static let msDomain = "MSDomain"
static let msData = "MSData"
+
+ static let combineCocoa = "CombineCocoa"
static let msDesignsystem = "MSDesignSystem"
static let msUIKit = "MSUIKit"
- static let msNetworking = "MSNetworking"
- static let msCoreKit = "MSCoreKit"
+
static let msExtension = "MSExtension"
static let msLogger = "MSLogger"
static let msFoundation = "MSFoundation"
@@ -57,8 +58,6 @@ let package = Package(
path: Dependency.msData.fromRootPath),
.package(name: Dependency.msUIKit,
path: Dependency.msUIKit.fromRootPath),
- .package(name: Dependency.msCoreKit,
- path: Dependency.msCoreKit.fromRootPath),
.package(name: Dependency.msFoundation,
path: Dependency.msFoundation.fromRootPath)
],
@@ -67,18 +66,14 @@ let package = Package(
dependencies: [
.product(name: Dependency.msDomain,
package: Dependency.msDomain),
+ .product(name: Dependency.msData,
+ package: Dependency.msData),
.product(name: Dependency.msUIKit,
package: Dependency.msUIKit),
- .product(name: Dependency.msDesignsystem,
- package: Dependency.msUIKit),
.product(name: Dependency.msLogger,
package: Dependency.msFoundation),
.product(name: Dependency.msExtension,
- package: Dependency.msFoundation),
- .product(name: Dependency.msNetworking,
- package: Dependency.msCoreKit),
- .product(name: Dependency.msData,
- package: Dependency.msData)
+ package: Dependency.msFoundation)
])
]
)
diff --git a/iOS/Features/SaveJourney/Package.swift b/iOS/Features/SaveJourney/Package.swift
index c517c57..2592d97 100644
--- a/iOS/Features/SaveJourney/Package.swift
+++ b/iOS/Features/SaveJourney/Package.swift
@@ -30,13 +30,8 @@ private enum Dependency {
static let msDomain = "MSDomain"
static let msData = "MSData"
- static let combineCocoa = "CombineCocoa"
- static let msDesignsystem = "MSDesignSystem"
static let msUIKit = "MSUIKit"
- static let msImageFetcher = "MSImageFetcher"
- static let msCoreKit = "MSCoreKit"
-
static let msExtension = "MSExtension"
static let msLogger = "MSLogger"
static let msFoundation = "MSFoundation"
@@ -57,12 +52,10 @@ let package = Package(
dependencies: [
.package(name: Dependency.msDomain,
path: Dependency.msDomain.fromRootPath),
- .package(name: Dependency.msUIKit,
- path: Dependency.msUIKit.fromRootPath),
.package(name: Dependency.msData,
path: Dependency.msData.fromRootPath),
- .package(name: Dependency.msCoreKit,
- path: Dependency.msCoreKit.fromRootPath),
+ .package(name: Dependency.msUIKit,
+ path: Dependency.msUIKit.fromRootPath),
.package(name: Dependency.msFoundation,
path: Dependency.msFoundation.fromRootPath)
],
@@ -75,10 +68,6 @@ let package = Package(
package: Dependency.msData),
.product(name: Dependency.msUIKit,
package: Dependency.msUIKit),
- .product(name: Dependency.combineCocoa,
- package: Dependency.msUIKit),
- .product(name: Dependency.msImageFetcher,
- package: Dependency.msCoreKit),
.product(name: Dependency.msExtension,
package: Dependency.msFoundation),
.product(name: Dependency.msLogger,
diff --git a/iOS/Features/SaveJourney/Sources/SaveJourney/Presentation/SaveJourneyViewModel.swift b/iOS/Features/SaveJourney/Sources/SaveJourney/Presentation/SaveJourneyViewModel.swift
index d3b5cf8..53d7d38 100644
--- a/iOS/Features/SaveJourney/Sources/SaveJourney/Presentation/SaveJourneyViewModel.swift
+++ b/iOS/Features/SaveJourney/Sources/SaveJourney/Presentation/SaveJourneyViewModel.swift
@@ -9,7 +9,6 @@ import Combine
import Foundation
import MusicKit
-import MSData
import MSDomain
import MSLogger
diff --git a/iOS/Features/SaveJourney/Sources/SaveJourney/Presentation/View/SaveJourneyMusicCell.swift b/iOS/Features/SaveJourney/Sources/SaveJourney/Presentation/View/SaveJourneyMusicCell.swift
index 97b71b8..6545f47 100644
--- a/iOS/Features/SaveJourney/Sources/SaveJourney/Presentation/View/SaveJourneyMusicCell.swift
+++ b/iOS/Features/SaveJourney/Sources/SaveJourney/Presentation/View/SaveJourneyMusicCell.swift
@@ -9,7 +9,6 @@ import UIKit
import MSDesignSystem
import MSDomain
-import MSImageFetcher
final class SaveJourneyMusicCell: UICollectionViewCell {
diff --git a/iOS/Features/SaveJourney/Sources/SaveJourney/Presentation/View/SpotCell.swift b/iOS/Features/SaveJourney/Sources/SaveJourney/Presentation/View/SpotCell.swift
index 630b11a..c8899d0 100644
--- a/iOS/Features/SaveJourney/Sources/SaveJourney/Presentation/View/SpotCell.swift
+++ b/iOS/Features/SaveJourney/Sources/SaveJourney/Presentation/View/SpotCell.swift
@@ -9,7 +9,6 @@ import UIKit
import MSDesignSystem
import MSExtension
-import MSImageFetcher
final class SpotCell: UICollectionViewCell {
diff --git a/iOS/Features/SelectSong/Package.swift b/iOS/Features/SelectSong/Package.swift
index fe8cbb9..cc2f6cb 100644
--- a/iOS/Features/SelectSong/Package.swift
+++ b/iOS/Features/SelectSong/Package.swift
@@ -30,9 +30,6 @@ private enum Dependency {
static let msDomain = "MSDomain"
static let msData = "MSData"
- static let msImageFetcher = "MSImageFetcher"
- static let msCoreKit = "MSCoreKit"
-
static let combineCocoa = "CombineCocoa"
static let msDesignsystem = "MSDesignSystem"
static let msUIKit = "MSUIKit"
@@ -58,8 +55,6 @@ let package = Package(
path: Dependency.msDomain.fromRootPath),
.package(name: Dependency.msData,
path: Dependency.msData.fromRootPath),
- .package(name: Dependency.msCoreKit,
- path: Dependency.msCoreKit.fromRootPath),
.package(name: Dependency.msUIKit,
path: Dependency.msUIKit.fromRootPath),
.package(name: Dependency.msFoundation,
@@ -72,12 +67,8 @@ let package = Package(
package: Dependency.msDomain),
.product(name: Dependency.msData,
package: Dependency.msData),
- .product(name: Dependency.msImageFetcher,
- package: Dependency.msCoreKit),
.product(name: Dependency.msUIKit,
package: Dependency.msUIKit),
- .product(name: Dependency.combineCocoa,
- package: Dependency.msUIKit),
.product(name: Dependency.msLogger,
package: Dependency.msFoundation)
])
diff --git a/iOS/Features/Spot/Package.swift b/iOS/Features/Spot/Package.swift
index 76630c0..eddc5f5 100644
--- a/iOS/Features/Spot/Package.swift
+++ b/iOS/Features/Spot/Package.swift
@@ -28,18 +28,13 @@ private enum Target {
private enum Dependency {
// package
+ static let msData = "MSData"
+ static let msDomain = "MSDomain"
static let msUIKit = "MSUIKit"
static let msFoundation = "MSFoundation"
- static let msCoreKit = "MSCoreKit"
// library
- static let msDesignsystem = "MSDesignSystem"
static let msLogger = "MSLogger"
- static let msNetworking = "MSNetworking"
-
- // package = library
- static let msData = "MSData"
- static let msDomain = "MSDomain"
}
@@ -55,32 +50,26 @@ let package = Package(
targets: [Target.spot])
],
dependencies: [
+ .package(name: Dependency.msDomain,
+ path: Dependency.msDomain.fromRootPath),
+ .package(name: Dependency.msData,
+ path: Dependency.msData.fromRootPath),
.package(name: Dependency.msUIKit,
path: Dependency.msUIKit.fromRootPath),
.package(name: Dependency.msFoundation,
- path: Dependency.msFoundation.fromRootPath),
- .package(name: Dependency.msCoreKit,
- path: Dependency.msCoreKit.fromRootPath),
- .package(name: Dependency.msData,
- path: Dependency.msData.fromRootPath),
- .package(name: Dependency.msDomain,
- path: Dependency.msDomain.fromRootPath)
+ path: Dependency.msFoundation.fromRootPath)
],
targets: [
.target(name: Target.spot,
dependencies: [
.product(name: Dependency.msDomain,
package: Dependency.msDomain),
+ .product(name: Dependency.msData,
+ package: Dependency.msData),
.product(name: Dependency.msUIKit,
package: Dependency.msUIKit),
- .product(name: Dependency.msDesignsystem,
- package: Dependency.msUIKit),
.product(name: Dependency.msLogger,
- package: Dependency.msFoundation),
- .product(name: Dependency.msNetworking,
- package: Dependency.msCoreKit),
- .product(name: Dependency.msData,
- package: Dependency.msData)
+ package: Dependency.msFoundation)
])
]
)
diff --git a/iOS/Features/Spot/Sources/Spot/Presentation/SaveSpotViewModel.swift b/iOS/Features/Spot/Sources/Spot/Presentation/SaveSpotViewModel.swift
index e9ff96c..d5fce03 100644
--- a/iOS/Features/Spot/Sources/Spot/Presentation/SaveSpotViewModel.swift
+++ b/iOS/Features/Spot/Sources/Spot/Presentation/SaveSpotViewModel.swift
@@ -57,10 +57,11 @@ internal extension SaveSpotViewModel {
MSLogger.make(category: .spot).error("recoding 중인 journeyID를 찾지 못하였습니다.")
return
}
- let spot = CreateSpotRequestDTO(journeyId: recordingJourneyID,
- coordinate: CoordinateDTO(self.coordinate),
+ let spot = RequestableSpot(journeyID: recordingJourneyID,
+ coordinate: self.coordinate,
timestamp: .now,
photoData: data)
+
let result = await self.spotRepository.upload(spot: spot)
switch result {
case .success(let spot):
diff --git a/iOS/Features/Spot/SpotDemo/SpotDemo/AppDelegate.swift b/iOS/Features/Spot/SpotDemo/SpotDemo/AppDelegate.swift
deleted file mode 100644
index 928908b..0000000
--- a/iOS/Features/Spot/SpotDemo/SpotDemo/AppDelegate.swift
+++ /dev/null
@@ -1,21 +0,0 @@
-//
-// AppDelegate.swift
-// SpotDemo
-//
-// Created by 이창준 on 2023.11.29.
-//
-
-import UIKit
-
-@main
-class AppDelegate: UIResponder, UIApplicationDelegate {
-
- // MARK: UISceneSession Lifecycle
-
- func application(_ application: UIApplication,
- configurationForConnecting connectingSceneSession: UISceneSession,
- options: UIScene.ConnectionOptions) -> UISceneConfiguration {
- return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
- }
-
-}
diff --git a/iOS/Features/Spot/SpotDemo/SpotDemo/Assets.xcassets/AccentColor.colorset/Contents.json b/iOS/Features/Spot/SpotDemo/SpotDemo/Assets.xcassets/AccentColor.colorset/Contents.json
deleted file mode 100644
index eb87897..0000000
--- a/iOS/Features/Spot/SpotDemo/SpotDemo/Assets.xcassets/AccentColor.colorset/Contents.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "colors" : [
- {
- "idiom" : "universal"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
diff --git a/iOS/Features/Spot/SpotDemo/SpotDemo/Assets.xcassets/AppIcon.appiconset/Contents.json b/iOS/Features/Spot/SpotDemo/SpotDemo/Assets.xcassets/AppIcon.appiconset/Contents.json
deleted file mode 100644
index 13613e3..0000000
--- a/iOS/Features/Spot/SpotDemo/SpotDemo/Assets.xcassets/AppIcon.appiconset/Contents.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "images" : [
- {
- "idiom" : "universal",
- "platform" : "ios",
- "size" : "1024x1024"
- }
- ],
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
diff --git a/iOS/Features/Spot/SpotDemo/SpotDemo/Assets.xcassets/Contents.json b/iOS/Features/Spot/SpotDemo/SpotDemo/Assets.xcassets/Contents.json
deleted file mode 100644
index 73c0059..0000000
--- a/iOS/Features/Spot/SpotDemo/SpotDemo/Assets.xcassets/Contents.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "info" : {
- "author" : "xcode",
- "version" : 1
- }
-}
diff --git a/iOS/Features/Spot/SpotDemo/SpotDemo/Base.lproj/LaunchScreen.storyboard b/iOS/Features/Spot/SpotDemo/SpotDemo/Base.lproj/LaunchScreen.storyboard
deleted file mode 100644
index 865e932..0000000
--- a/iOS/Features/Spot/SpotDemo/SpotDemo/Base.lproj/LaunchScreen.storyboard
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/iOS/Features/Spot/SpotDemo/SpotDemo/Base.lproj/Main.storyboard b/iOS/Features/Spot/SpotDemo/SpotDemo/Base.lproj/Main.storyboard
deleted file mode 100644
index 25a7638..0000000
--- a/iOS/Features/Spot/SpotDemo/SpotDemo/Base.lproj/Main.storyboard
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/iOS/Features/Spot/SpotDemo/SpotDemo/Info.plist b/iOS/Features/Spot/SpotDemo/SpotDemo/Info.plist
deleted file mode 100644
index c52b344..0000000
--- a/iOS/Features/Spot/SpotDemo/SpotDemo/Info.plist
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
- NSAppleMusicUsageDescription
- using photos in album
- NSCameraUsageDescription
- take photo
- UIApplicationSceneManifest
-
- UIApplicationSupportsMultipleScenes
-
- UISceneConfigurations
-
- UIWindowSceneSessionRoleApplication
-
-
- UISceneConfigurationName
- Default Configuration
- UISceneDelegateClassName
- $(PRODUCT_MODULE_NAME).SceneDelegate
- UISceneStoryboardFile
- Main
-
-
-
-
-
-
diff --git a/iOS/Features/Spot/SpotDemo/SpotDemo/SceneDelegate.swift b/iOS/Features/Spot/SpotDemo/SpotDemo/SceneDelegate.swift
deleted file mode 100644
index e08c933..0000000
--- a/iOS/Features/Spot/SpotDemo/SpotDemo/SceneDelegate.swift
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-// SceneDelegate.swift
-// SpotDemo
-//
-// Created by 이창준 on 2023.11.29.
-//
-
-import UIKit
-
-import MSData
-import MSDesignSystem
-import MSDomain
-import Spot
-
-class SceneDelegate: UIResponder, UIWindowSceneDelegate {
-
- var window: UIWindow?
-
- func scene(_ scene: UIScene,
- willConnectTo session: UISceneSession,
- options connectionOptions: UIScene.ConnectionOptions) {
- guard let windowScene = (scene as? UIWindowScene) else { return }
-
- window = UIWindow(windowScene: windowScene)
- MSFont.registerFonts()
-// let spotVM = SpotViewModel()
-// let spotVC = SpotViewController(viewModel: spotVM)
-
- let spotRepo = SpotRepositoryImplementation()
- let spotSaveVM = SpotSaveViewModel(repository: spotRepo,
- journeyID: "6571bef418be25527c66dc04",
- coordinate: Coordinate(latitude: 10, longitude: 10))
- let spotSaveVC = SpotSaveViewController(viewModel: spotSaveVM)
-
- window?.rootViewController = spotSaveVC
- window?.makeKeyAndVisible()
- }
-
-}
diff --git a/iOS/Features/Spot/SpotDemo/SpotDemo/ViewController.swift b/iOS/Features/Spot/SpotDemo/SpotDemo/ViewController.swift
deleted file mode 100644
index 82c12bf..0000000
--- a/iOS/Features/Spot/SpotDemo/SpotDemo/ViewController.swift
+++ /dev/null
@@ -1,12 +0,0 @@
-//
-// ViewController.swift
-// SpotDemo
-//
-// Created by 이창준 on 2023.11.29.
-//
-
-import UIKit
-
-class ViewController: UIViewController {
-
-}
diff --git a/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSFetcherTests.xcscheme b/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSFetcherTests.xcscheme
deleted file mode 100644
index f299dc2..0000000
--- a/iOS/MSCoreKit/.swiftpm/xcode/xcshareddata/xcschemes/MSFetcherTests.xcscheme
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/iOS/MSCoreKit/Package.swift b/iOS/MSCoreKit/Package.swift
index 2063e38..8652136 100644
--- a/iOS/MSCoreKit/Package.swift
+++ b/iOS/MSCoreKit/Package.swift
@@ -24,7 +24,6 @@ private enum Target {
static let msImageFetcher = "MSImageFetcher"
static let msPersistentStorage = "MSPersistentStorage"
static let msNetworking = "MSNetworking"
- static let msFetcher = "MSFetcher"
static let msCacheStorage = "MSCacheStorage"
static let msKeychainStorage = "MSKeychainStorage"
static let msMapKit = "MSMapKit"
@@ -53,8 +52,6 @@ let package = Package(
targets: [Target.msPersistentStorage]),
.library(name: Target.msNetworking,
targets: [Target.msNetworking]),
- .library(name: Target.msFetcher,
- targets: [Target.msFetcher]),
.library(name: Target.msCacheStorage,
targets: [Target.msCacheStorage]),
.library(name: Target.msKeychainStorage,
@@ -84,11 +81,6 @@ let package = Package(
.product(name: Dependency.msLogger,
package: Dependency.msFoundation)
]),
- .target(name: Target.msFetcher,
- dependencies: [
- .target(name: Target.msPersistentStorage),
- .target(name: Target.msNetworking)
- ]),
.target(name: Target.msCacheStorage,
dependencies: [
.product(name: Dependency.msConstants,
@@ -111,10 +103,6 @@ let package = Package(
dependencies: [
.target(name: Target.msNetworking)
]),
- .testTarget(name: Target.msFetcher.testTarget,
- dependencies: [
- .target(name: Target.msFetcher)
- ]),
.testTarget(name: Target.msCacheStorage.testTarget,
dependencies: [
.target(name: Target.msCacheStorage)
diff --git a/iOS/MSCoreKit/Sources/MSFetcher/MSFetcher.swift b/iOS/MSCoreKit/Sources/MSFetcher/MSFetcher.swift
deleted file mode 100644
index 32d05c6..0000000
--- a/iOS/MSCoreKit/Sources/MSFetcher/MSFetcher.swift
+++ /dev/null
@@ -1,6 +0,0 @@
-//
-// MSFetcher.swift
-// MSCoreKit
-//
-// Created by 이창준 on 11/14/23.
-//
diff --git a/iOS/MSCoreKit/Tests/MSFetcherTests/MSFetcherTests.swift b/iOS/MSCoreKit/Tests/MSFetcherTests/MSFetcherTests.swift
deleted file mode 100644
index d33b917..0000000
--- a/iOS/MSCoreKit/Tests/MSFetcherTests/MSFetcherTests.swift
+++ /dev/null
@@ -1,12 +0,0 @@
-//
-// MSFetcherTests.swift
-// MSCoreKit
-//
-// Created by 이창준 on 11/14/23.
-//
-
-import XCTest
-
-final class MSFetcherTests: XCTestCase {
-
-}
diff --git a/iOS/MSData/Sources/MSData/Repository/Error/Repository+Error.swift b/iOS/MSData/Sources/MSData/RepositoryImplementation/Error/Repository+Error.swift
similarity index 100%
rename from iOS/MSData/Sources/MSData/Repository/Error/Repository+Error.swift
rename to iOS/MSData/Sources/MSData/RepositoryImplementation/Error/Repository+Error.swift
diff --git a/iOS/MSData/Sources/MSData/Repository/JourneyRepository.swift b/iOS/MSData/Sources/MSData/RepositoryImplementation/JourneyRepository.swift
similarity index 88%
rename from iOS/MSData/Sources/MSData/Repository/JourneyRepository.swift
rename to iOS/MSData/Sources/MSData/RepositoryImplementation/JourneyRepository.swift
index 2a5c26e..bdab757 100644
--- a/iOS/MSData/Sources/MSData/Repository/JourneyRepository.swift
+++ b/iOS/MSData/Sources/MSData/RepositoryImplementation/JourneyRepository.swift
@@ -15,22 +15,6 @@ import MSNetworking
import MSPersistentStorage
import MSUserDefaults
-public protocol JourneyRepository: Persistable {
-
- func fetchIsRecording() -> Bool
- mutating func updateIsRecording(_ isRecording: Bool) -> Bool
- func fetchRecordingJourneyID() -> String?
- func fetchRecordingJourney(forID id: String) -> RecordingJourney?
- func fetchJourneyList(userID: UUID,
- minCoordinate: Coordinate,
- maxCoordinate: Coordinate) async -> Result<[Journey], Error>
- mutating func startJourney(at coordinate: Coordinate, userID: UUID) async -> Result
- mutating func endJourney(_ journey: Journey) async -> Result
- func recordJourney(journeyID: String, at coordinates: [Coordinate]) async -> Result
- mutating func deleteJourney(_ journey: RecordingJourney, userID: UUID) async -> Result
-
-}
-
public struct JourneyRepositoryImplementation: JourneyRepository {
// MARK: - Properties
@@ -131,8 +115,8 @@ public struct JourneyRepositoryImplementation: JourneyRepository {
spots: [],
coordinates: [responseDTO.coordinate.toDomain()])
- self.saveToLocal(value: recordingJourney.id)
- self.saveToLocal(value: recordingJourney.startTimestamp)
+ LocalRecordingManager.shared.saveToLocal(recordingJourney.id, at: self.storage)
+ LocalRecordingManager.shared.saveToLocal(recordingJourney.startTimestamp, at: self.storage)
self.recordingJourneyID = recordingJourney.id
self.isRecording = true
@@ -166,7 +150,9 @@ public struct JourneyRepositoryImplementation: JourneyRepository {
spots: [],
coordinates: coordinates)
- responseDTO.coordinates.forEach { self.saveToLocal(value: $0) }
+ responseDTO.coordinates.forEach {
+ LocalRecordingManager.shared.saveToLocal($0, at: self.storage)
+ }
return .success(recordingJourney)
case .failure(let error):
@@ -207,4 +193,8 @@ public struct JourneyRepositoryImplementation: JourneyRepository {
}
}
+ public func loadJourneyFromLocal() -> RecordingJourney? {
+ return LocalRecordingManager.shared.loadJourney(from: self.storage)
+ }
+
}
diff --git a/iOS/MSData/Sources/MSData/Repository/SongRepository.swift b/iOS/MSData/Sources/MSData/RepositoryImplementation/SongRepository.swift
similarity index 88%
rename from iOS/MSData/Sources/MSData/Repository/SongRepository.swift
rename to iOS/MSData/Sources/MSData/RepositoryImplementation/SongRepository.swift
index 843687e..5cf1f6b 100644
--- a/iOS/MSData/Sources/MSData/Repository/SongRepository.swift
+++ b/iOS/MSData/Sources/MSData/RepositoryImplementation/SongRepository.swift
@@ -8,18 +8,10 @@
import Foundation
import MusicKit
+import MSDomain
import MSLogger
import MSNetworking
-public protocol SongRepository {
-
- func fetchSong(withID id: String) async -> Result
- func fetchSongList(with term: String) async -> Result, Error>
- @available(iOS 16.0, *)
- func fetchSongListByRank() async -> Result, Error>
-
-}
-
public struct SongRepositoryImplementation: SongRepository {
// MARK: - Properties
diff --git a/iOS/MSData/Sources/MSData/Repository/SpotRepository.swift b/iOS/MSData/Sources/MSData/RepositoryImplementation/SpotRepository.swift
similarity index 84%
rename from iOS/MSData/Sources/MSData/Repository/SpotRepository.swift
rename to iOS/MSData/Sources/MSData/RepositoryImplementation/SpotRepository.swift
index 336cb94..dabac2a 100644
--- a/iOS/MSData/Sources/MSData/Repository/SpotRepository.swift
+++ b/iOS/MSData/Sources/MSData/RepositoryImplementation/SpotRepository.swift
@@ -12,13 +12,6 @@ import MSNetworking
import MSLogger
import MSPersistentStorage
-public protocol SpotRepository: Persistable {
-
- func fetchRecordingSpots() async -> Result<[Spot], Error>
- func upload(spot: CreateSpotRequestDTO) async -> Result
-
-}
-
public struct SpotRepositoryImplementation: SpotRepository {
// MARK: - Properties
@@ -66,7 +59,13 @@ public struct SpotRepositoryImplementation: SpotRepository {
#endif
}
- public func upload(spot: CreateSpotRequestDTO) async -> Result {
+ public func upload(spot: RequestableSpot) async -> Result {
+
+ let spot = CreateSpotRequestDTO(journeyId: spot.journeyID,
+ coordinate: CoordinateDTO(spot.coordinate),
+ timestamp: spot.timestamp,
+ photoData: spot.photoData)
+
let router = SpotRouter.upload(spot: spot, id: UUID())
let result = await self.networking.request(SpotDTO.self, router: router)
switch result {
@@ -74,7 +73,7 @@ public struct SpotRepositoryImplementation: SpotRepository {
#if DEBUG
MSLogger.make(category: .network).debug("성공적으로 업로드하였습니다.")
#endif
- self.saveToLocal(value: spot)
+ LocalRecordingManager.shared.saveToLocal(spot, at: self.storage)
return .success(spot.toDomain())
case .failure(let error):
MSLogger.make(category: .network).error("\(error): 업로드에 실패하였습니다.")
diff --git a/iOS/MSData/Sources/MSData/Repository/UserRepository.swift b/iOS/MSData/Sources/MSData/RepositoryImplementation/UserRepository.swift
similarity index 94%
rename from iOS/MSData/Sources/MSData/Repository/UserRepository.swift
rename to iOS/MSData/Sources/MSData/RepositoryImplementation/UserRepository.swift
index 24954a7..d18b04a 100644
--- a/iOS/MSData/Sources/MSData/Repository/UserRepository.swift
+++ b/iOS/MSData/Sources/MSData/RepositoryImplementation/UserRepository.swift
@@ -7,18 +7,11 @@
import Foundation
+import MSDomain
import MSKeychainStorage
import MSLogger
import MSNetworking
-public protocol UserRepository {
-
- func createUser() async -> Result
- func storeUUID(_ userID: UUID) throws -> UUID
- func fetchUUID() -> UUID?
-
-}
-
public struct UserRepositoryImplementation: UserRepository {
// MARK: - Properties
diff --git a/iOS/MSData/Sources/MSData/Repository/Persistable.swift b/iOS/MSData/Sources/MSData/Util/LocalRecordingManager.swift
similarity index 64%
rename from iOS/MSData/Sources/MSData/Repository/Persistable.swift
rename to iOS/MSData/Sources/MSData/Util/LocalRecordingManager.swift
index f3d53d5..a8eb5bf 100644
--- a/iOS/MSData/Sources/MSData/Repository/Persistable.swift
+++ b/iOS/MSData/Sources/MSData/Util/LocalRecordingManager.swift
@@ -1,5 +1,5 @@
//
-// Persistable.swift
+// LocalRecordingManager.swift
// MSData
//
// Created by 전민건 on 2023.12.10.
@@ -11,16 +11,6 @@ import MSDomain
import MSLogger
import MSPersistentStorage
-public protocol Persistable {
-
- var storage: MSPersistentStorage { get }
-
- @discardableResult
- func saveToLocal(value: Codable) -> Bool
- func loadJourneyFromLocal() -> RecordingJourney?
-
-}
-
// MARK: - KeyStorage
private struct KeyStorage {
@@ -34,12 +24,14 @@ private struct KeyStorage {
// MARK: - Default Implementations
-extension Persistable {
+public struct LocalRecordingManager {
+
+ public static let shared = LocalRecordingManager()
@discardableResult
- public func saveToLocal(value: Codable) -> Bool {
+ public func saveToLocal(_ value: Codable, at storage: MSPersistentStorage) -> Bool {
let key = UUID().uuidString
- self.storage.set(value: value, forKey: key)
+ storage.set(value: value, forKey: key)
switch value {
case is String:
@@ -53,7 +45,7 @@ extension Persistable {
if KeyStorage.startTimestamp == nil {
KeyStorage.startTimestamp = key
} else {
- MSLogger.make(category: .persistable).debug("start tamp는 하나의 값만 저장할 수 있습니다.")
+ MSLogger.make(category: .persistable).debug("start timestamp는 하나의 값만 저장할 수 있습니다.")
return false
}
case is SpotDTO:
@@ -67,20 +59,20 @@ extension Persistable {
return true
}
- public func loadJourneyFromLocal() -> RecordingJourney? {
- guard let id = self.loadID(),
- let startTimestamp = self.loadStartTimeStamp() else {
+ public func loadJourney(from storage: MSPersistentStorage) -> RecordingJourney? {
+ guard let id = self.loadID(from: storage),
+ let startTimestamp = self.loadStartTimeStamp(from: storage) else {
return nil
}
return RecordingJourney(id: id,
startTimestamp: startTimestamp,
- spots: self.loadSpots(),
- coordinates: self.loadCoordinates())
+ spots: self.loadSpots(from: storage),
+ coordinates: self.loadCoordinates(from: storage))
}
- func loadStartTimeStamp() -> Date? {
+ private func loadStartTimeStamp(from storage: MSPersistentStorage) -> Date? {
guard let startTimestampKey = KeyStorage.startTimestamp,
- let startTimestamp = self.storage.get(Date.self, forKey: startTimestampKey)
+ let startTimestamp = storage.get(Date.self, forKey: startTimestampKey)
else {
MSLogger.make(category: .persistable).debug("id 또는 startTimestamp가 저장되지 않았습니다.")
return nil
@@ -88,25 +80,25 @@ extension Persistable {
return startTimestamp
}
- func loadID() -> String? {
+ private func loadID(from storage: MSPersistentStorage) -> String? {
guard let idKey = KeyStorage.id,
- let id = self.storage.get(String.self, forKey: idKey) else {
+ let id = storage.get(String.self, forKey: idKey) else {
MSLogger.make(category: .persistable).debug("id 또는 startTimestamp가 저장되지 않았습니다.")
return nil
}
return id
}
- func loadSpots() -> [Spot] {
+ private func loadSpots(from storage: MSPersistentStorage) -> [Spot] {
return KeyStorage.spots.compactMap { spotKey in
- let spotDTO = self.storage.get(SpotDTO.self, forKey: spotKey)
+ let spotDTO = storage.get(SpotDTO.self, forKey: spotKey)
return spotDTO?.toDomain()
}
}
- func loadCoordinates() -> [Coordinate] {
+ private func loadCoordinates(from storage: MSPersistentStorage) -> [Coordinate] {
return KeyStorage.coordinates.compactMap { coordinateKey in
- let coordinateDTO = self.storage.get(CoordinateDTO.self, forKey: coordinateKey)
+ let coordinateDTO = storage.get(CoordinateDTO.self, forKey: coordinateKey)
return coordinateDTO?.toDomain()
}
}
diff --git a/iOS/MSData/Tests/RepositoryTests/PersistableRepositoryTests.swift b/iOS/MSData/Tests/RepositoryTests/PersistentManagerTests.swift
similarity index 62%
rename from iOS/MSData/Tests/RepositoryTests/PersistableRepositoryTests.swift
rename to iOS/MSData/Tests/RepositoryTests/PersistentManagerTests.swift
index 4cdcf5c..8bc2771 100644
--- a/iOS/MSData/Tests/RepositoryTests/PersistableRepositoryTests.swift
+++ b/iOS/MSData/Tests/RepositoryTests/PersistentManagerTests.swift
@@ -8,12 +8,13 @@
import XCTest
@testable import MSData
@testable import MSDomain
+@testable import MSPersistentStorage
-final class PersistableRepositoryTests: XCTestCase {
+final class PersistentManagerTests: XCTestCase {
// MARK: - Properties
- private let journeyRepository = JourneyRepositoryImplementation()
+ let storage = FileManagerStorage()
// MARK: - Tests
@@ -23,11 +24,11 @@ final class PersistableRepositoryTests: XCTestCase {
let spot = Spot(coordinate: coordinate, timestamp: .now, photoURL: url)
- XCTAssertTrue(self.journeyRepository.saveToLocal(value: SpotDTO(spot)))
+ XCTAssertTrue(LocalRecordingManager.shared.saveToLocal(SpotDTO(spot), at: self.storage))
}
func test_RecordingJourney_하위요소가_아닌_것들_저장_실패() {
- XCTAssertFalse(self.journeyRepository.saveToLocal(value: Int()))
+ XCTAssertFalse(LocalRecordingManager.shared.saveToLocal(Int(), at: self.storage))
}
func test_RecordingJourney_반환_성공() {
@@ -38,12 +39,12 @@ final class PersistableRepositoryTests: XCTestCase {
let coordinate = Coordinate(latitude: 5, longitude: 5)
let spot = Spot(coordinate: coordinate, timestamp: .now, photoURL: url)
- self.journeyRepository.saveToLocal(value: id)
- self.journeyRepository.saveToLocal(value: Date.now)
- self.journeyRepository.saveToLocal(value: SpotDTO(spot))
- self.journeyRepository.saveToLocal(value: CoordinateDTO(coordinate))
+ LocalRecordingManager.shared.saveToLocal(id, at: self.storage)
+ LocalRecordingManager.shared.saveToLocal(Date.now, at: self.storage)
+ LocalRecordingManager.shared.saveToLocal(SpotDTO(spot), at: self.storage)
+ LocalRecordingManager.shared.saveToLocal(CoordinateDTO(coordinate), at: self.storage)
- guard let loadedJourney = self.journeyRepository.loadJourneyFromLocal() else {
+ guard let loadedJourney = LocalRecordingManager.shared.loadJourney(from: self.storage) else {
XCTFail("load 실패")
return
}
diff --git a/iOS/MSDomain/Sources/MSDomain/Model/Spot.swift b/iOS/MSDomain/Sources/MSDomain/Model/Spot.swift
index 93cbb5b..8eaca4a 100644
--- a/iOS/MSDomain/Sources/MSDomain/Model/Spot.swift
+++ b/iOS/MSDomain/Sources/MSDomain/Model/Spot.swift
@@ -27,6 +27,29 @@ public struct Spot {
}
+public struct RequestableSpot {
+
+ // MARK: - Properties
+
+ public let journeyID: String
+ public let coordinate: Coordinate
+ public let timestamp: Date
+ public let photoData: Data
+
+ // MARK: - Initializer
+
+ public init(journeyID: String,
+ coordinate: Coordinate,
+ timestamp: Date,
+ photoData: Data) {
+ self.journeyID = journeyID
+ self.coordinate = coordinate
+ self.timestamp = timestamp
+ self.photoData = photoData
+ }
+
+}
+
// MARK: - Hashable
extension Spot: Hashable { }
diff --git a/iOS/MSDomain/Sources/MSDomain/Repository/JourneyRepository.swift b/iOS/MSDomain/Sources/MSDomain/Repository/JourneyRepository.swift
new file mode 100644
index 0000000..5c683b5
--- /dev/null
+++ b/iOS/MSDomain/Sources/MSDomain/Repository/JourneyRepository.swift
@@ -0,0 +1,24 @@
+//
+// JourneyRepository.swift
+// MSDomain
+//
+// Created by 이창준 on 2023.12.24.
+//
+
+import Foundation
+
+public protocol JourneyRepository {
+
+ func fetchIsRecording() -> Bool
+ mutating func updateIsRecording(_ isRecording: Bool) -> Bool
+ func fetchRecordingJourneyID() -> String?
+ func fetchRecordingJourney(forID id: String) -> RecordingJourney?
+ func fetchJourneyList(userID: UUID,
+ minCoordinate: Coordinate,
+ maxCoordinate: Coordinate) async -> Result<[Journey], Error>
+ mutating func startJourney(at coordinate: Coordinate, userID: UUID) async -> Result
+ mutating func endJourney(_ journey: Journey) async -> Result
+ func recordJourney(journeyID: String, at coordinates: [Coordinate]) async -> Result
+ mutating func deleteJourney(_ journey: RecordingJourney, userID: UUID) async -> Result
+ func loadJourneyFromLocal() -> RecordingJourney?
+}
diff --git a/iOS/MSDomain/Sources/MSDomain/Repository/SongRepository.swift b/iOS/MSDomain/Sources/MSDomain/Repository/SongRepository.swift
new file mode 100644
index 0000000..7ef0039
--- /dev/null
+++ b/iOS/MSDomain/Sources/MSDomain/Repository/SongRepository.swift
@@ -0,0 +1,18 @@
+//
+// SongRepository.swift
+// MSDomain
+//
+// Created by 이창준 on 2023.12.24.
+//
+
+import Foundation
+import MusicKit
+
+public protocol SongRepository {
+
+ func fetchSong(withID id: String) async -> Result
+ func fetchSongList(with term: String) async -> Result, Error>
+ @available(iOS 16.0, *)
+ func fetchSongListByRank() async -> Result, Error>
+
+}
diff --git a/iOS/MSDomain/Sources/MSDomain/Repository/SpotRepository.swift b/iOS/MSDomain/Sources/MSDomain/Repository/SpotRepository.swift
new file mode 100644
index 0000000..0efbfef
--- /dev/null
+++ b/iOS/MSDomain/Sources/MSDomain/Repository/SpotRepository.swift
@@ -0,0 +1,15 @@
+//
+// SpotRepository.swift
+// MSDomain
+//
+// Created by 이창준 on 2023.12.24.
+//
+
+import Foundation
+
+public protocol SpotRepository {
+
+ func fetchRecordingSpots() async -> Result<[Spot], Error>
+ func upload(spot: RequestableSpot) async -> Result
+
+}
diff --git a/iOS/MSDomain/Sources/MSDomain/Repository/UserRepository.swift b/iOS/MSDomain/Sources/MSDomain/Repository/UserRepository.swift
new file mode 100644
index 0000000..68a4d44
--- /dev/null
+++ b/iOS/MSDomain/Sources/MSDomain/Repository/UserRepository.swift
@@ -0,0 +1,16 @@
+//
+// UserRepository.swift
+// MSDomain
+//
+// Created by 이창준 on 2023.12.24.
+//
+
+import Foundation
+
+public protocol UserRepository {
+
+ func createUser() async -> Result
+ func storeUUID(_ userID: UUID) throws -> UUID
+ func fetchUUID() -> UUID?
+
+}
diff --git a/iOS/MSUIKit/Package.swift b/iOS/MSUIKit/Package.swift
index 0df0c20..2d9e5d1 100644
--- a/iOS/MSUIKit/Package.swift
+++ b/iOS/MSUIKit/Package.swift
@@ -41,12 +41,8 @@ let package = Package(
.iOS(.v15)
],
products: [
- .library(name: Target.msDesignSystem,
- targets: [Target.msDesignSystem]),
.library(name: Target.msUIKit,
- targets: [Target.msUIKit]),
- .library(name: Target.combineCocoa,
- targets: [Target.combineCocoa])
+ targets: [Target.msUIKit])
],
dependencies: [
.package(name: Dependency.msCoreKit,
@@ -63,6 +59,7 @@ let package = Package(
.target(name: Target.msUIKit,
dependencies: [
.target(name: Target.msDesignSystem),
+ .target(name: Target.combineCocoa),
.product(name: Dependency.msImageFetcher,
package: Dependency.msCoreKit),
.product(name: Dependency.msExtension,
diff --git a/iOS/MusicSpot/MusicSpot.xcodeproj/project.pbxproj b/iOS/MusicSpot/MusicSpot.xcodeproj/project.pbxproj
index fc80d34..99b31f8 100644
--- a/iOS/MusicSpot/MusicSpot.xcodeproj/project.pbxproj
+++ b/iOS/MusicSpot/MusicSpot.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 60;
+ objectVersion = 56;
objects = {
/* Begin PBXBuildFile section */
@@ -13,24 +13,19 @@
08CBF87D2B18468E007D3797 /* SpotCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08CBF8752B18468E007D3797 /* SpotCoordinator.swift */; };
08CBF87E2B18468E007D3797 /* SaveJourneyFlowCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08CBF8762B18468E007D3797 /* SaveJourneyFlowCoordinator.swift */; };
08CBF87F2B18468E007D3797 /* Coordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 08CBF8772B18468E007D3797 /* Coordinator.swift */; };
- DD0194E92B25C42E007CE082 /* Home in Frameworks */ = {isa = PBXBuildFile; productRef = DD0194E82B25C42E007CE082 /* Home */; };
- DD0194EB2B25C42E007CE082 /* NavigateMap in Frameworks */ = {isa = PBXBuildFile; productRef = DD0194EA2B25C42E007CE082 /* NavigateMap */; };
- DD0194EE2B25C434007CE082 /* JourneyList in Frameworks */ = {isa = PBXBuildFile; productRef = DD0194ED2B25C434007CE082 /* JourneyList */; };
- DD0194F12B25C43B007CE082 /* RewindJourney in Frameworks */ = {isa = PBXBuildFile; productRef = DD0194F02B25C43B007CE082 /* RewindJourney */; };
- DD0194F42B25C441007CE082 /* SaveJourney in Frameworks */ = {isa = PBXBuildFile; productRef = DD0194F32B25C441007CE082 /* SaveJourney */; };
- DD0194F72B25C448007CE082 /* SelectSong in Frameworks */ = {isa = PBXBuildFile; productRef = DD0194F62B25C448007CE082 /* SelectSong */; };
- DD0194FA2B25C44E007CE082 /* Spot in Frameworks */ = {isa = PBXBuildFile; productRef = DD0194F92B25C44E007CE082 /* Spot */; };
+ DD72AF642B4B89E700EB4E81 /* CoordinatorFinishDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB22F742B433EC300F83D84 /* CoordinatorFinishDelegate.swift */; };
DD73F8592B024C4900EE9BF2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD73F8582B024C4900EE9BF2 /* AppDelegate.swift */; };
DD73F85B2B024C4900EE9BF2 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD73F85A2B024C4900EE9BF2 /* SceneDelegate.swift */; };
DD73F8622B024C4B00EE9BF2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DD73F8612B024C4B00EE9BF2 /* Assets.xcassets */; };
DD73F8652B024C4B00EE9BF2 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = DD73F8632B024C4B00EE9BF2 /* LaunchScreen.storyboard */; };
- DDB22F752B433EC300F83D84 /* CoordinatorFinishDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB22F742B433EC300F83D84 /* CoordinatorFinishDelegate.swift */; };
- DDBB292D2B310B1300A742CD /* MSCacheStorage in Frameworks */ = {isa = PBXBuildFile; productRef = DDBB292C2B310B1300A742CD /* MSCacheStorage */; };
- DDBB292F2B310B1300A742CD /* MSFetcher in Frameworks */ = {isa = PBXBuildFile; productRef = DDBB292E2B310B1300A742CD /* MSFetcher */; };
- DDBB29312B310B1300A742CD /* MSImageFetcher in Frameworks */ = {isa = PBXBuildFile; productRef = DDBB29302B310B1300A742CD /* MSImageFetcher */; };
- DDBB29332B310B1300A742CD /* MSKeychainStorage in Frameworks */ = {isa = PBXBuildFile; productRef = DDBB29322B310B1300A742CD /* MSKeychainStorage */; };
- DDBB29352B310B1300A742CD /* MSNetworking in Frameworks */ = {isa = PBXBuildFile; productRef = DDBB29342B310B1300A742CD /* MSNetworking */; };
- DDBB29372B310B1300A742CD /* MSPersistentStorage in Frameworks */ = {isa = PBXBuildFile; productRef = DDBB29362B310B1300A742CD /* MSPersistentStorage */; };
+ DD92FEAB2B35EDFF00A672F5 /* Home in Frameworks */ = {isa = PBXBuildFile; productRef = DD92FEAA2B35EDFF00A672F5 /* Home */; };
+ DD92FEAD2B35EE0700A672F5 /* NavigateMap in Frameworks */ = {isa = PBXBuildFile; productRef = DD92FEAC2B35EE0700A672F5 /* NavigateMap */; };
+ DD92FEAF2B35EE0700A672F5 /* JourneyList in Frameworks */ = {isa = PBXBuildFile; productRef = DD92FEAE2B35EE0700A672F5 /* JourneyList */; };
+ DD92FEB12B35EE0700A672F5 /* RewindJourney in Frameworks */ = {isa = PBXBuildFile; productRef = DD92FEB02B35EE0700A672F5 /* RewindJourney */; };
+ DD92FEB32B35EE0700A672F5 /* SelectSong in Frameworks */ = {isa = PBXBuildFile; productRef = DD92FEB22B35EE0700A672F5 /* SelectSong */; };
+ DD92FEB52B35EE0700A672F5 /* Spot in Frameworks */ = {isa = PBXBuildFile; productRef = DD92FEB42B35EE0700A672F5 /* Spot */; };
+ DD92FEB82B35EE5500A672F5 /* MSUIKit in Frameworks */ = {isa = PBXBuildFile; productRef = DD92FEB72B35EE5500A672F5 /* MSUIKit */; };
+ DD92FEBA2B35EEAF00A672F5 /* SaveJourney in Frameworks */ = {isa = PBXBuildFile; productRef = DD92FEB92B35EEAF00A672F5 /* SaveJourney */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -55,19 +50,14 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- DDBB29312B310B1300A742CD /* MSImageFetcher in Frameworks */,
- DD0194EB2B25C42E007CE082 /* NavigateMap in Frameworks */,
- DD0194E92B25C42E007CE082 /* Home in Frameworks */,
- DD0194F12B25C43B007CE082 /* RewindJourney in Frameworks */,
- DD0194EE2B25C434007CE082 /* JourneyList in Frameworks */,
- DDBB29372B310B1300A742CD /* MSPersistentStorage in Frameworks */,
- DD0194FA2B25C44E007CE082 /* Spot in Frameworks */,
- DD0194F42B25C441007CE082 /* SaveJourney in Frameworks */,
- DDBB29332B310B1300A742CD /* MSKeychainStorage in Frameworks */,
- DDBB29352B310B1300A742CD /* MSNetworking in Frameworks */,
- DD0194F72B25C448007CE082 /* SelectSong in Frameworks */,
- DDBB292F2B310B1300A742CD /* MSFetcher in Frameworks */,
- DDBB292D2B310B1300A742CD /* MSCacheStorage in Frameworks */,
+ DD92FEAD2B35EE0700A672F5 /* NavigateMap in Frameworks */,
+ DD92FEAB2B35EDFF00A672F5 /* Home in Frameworks */,
+ DD92FEB52B35EE0700A672F5 /* Spot in Frameworks */,
+ DD92FEB32B35EE0700A672F5 /* SelectSong in Frameworks */,
+ DD92FEB82B35EE5500A672F5 /* MSUIKit in Frameworks */,
+ DD92FEB12B35EE0700A672F5 /* RewindJourney in Frameworks */,
+ DD92FEBA2B35EEAF00A672F5 /* SaveJourney in Frameworks */,
+ DD92FEAF2B35EE0700A672F5 /* JourneyList in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -150,19 +140,14 @@
);
name = MusicSpot;
packageProductDependencies = (
- DD0194E82B25C42E007CE082 /* Home */,
- DD0194EA2B25C42E007CE082 /* NavigateMap */,
- DD0194ED2B25C434007CE082 /* JourneyList */,
- DD0194F02B25C43B007CE082 /* RewindJourney */,
- DD0194F32B25C441007CE082 /* SaveJourney */,
- DD0194F62B25C448007CE082 /* SelectSong */,
- DD0194F92B25C44E007CE082 /* Spot */,
- DDBB292C2B310B1300A742CD /* MSCacheStorage */,
- DDBB292E2B310B1300A742CD /* MSFetcher */,
- DDBB29302B310B1300A742CD /* MSImageFetcher */,
- DDBB29322B310B1300A742CD /* MSKeychainStorage */,
- DDBB29342B310B1300A742CD /* MSNetworking */,
- DDBB29362B310B1300A742CD /* MSPersistentStorage */,
+ DD92FEAA2B35EDFF00A672F5 /* Home */,
+ DD92FEAC2B35EE0700A672F5 /* NavigateMap */,
+ DD92FEAE2B35EE0700A672F5 /* JourneyList */,
+ DD92FEB02B35EE0700A672F5 /* RewindJourney */,
+ DD92FEB22B35EE0700A672F5 /* SelectSong */,
+ DD92FEB42B35EE0700A672F5 /* Spot */,
+ DD92FEB72B35EE5500A672F5 /* MSUIKit */,
+ DD92FEB92B35EEAF00A672F5 /* SaveJourney */,
);
productName = MusicSpot;
productReference = DD73F8552B024C4900EE9BF2 /* MusicSpot.app */;
@@ -193,13 +178,6 @@
);
mainGroup = DD73F84C2B024C4900EE9BF2;
packageReferences = (
- DD0194E72B25C42E007CE082 /* XCLocalSwiftPackageReference "../Features/Home" */,
- DD0194EC2B25C434007CE082 /* XCLocalSwiftPackageReference "../Features/JourneyList" */,
- DD0194EF2B25C43B007CE082 /* XCLocalSwiftPackageReference "../Features/RewindJourney" */,
- DD0194F22B25C441007CE082 /* XCLocalSwiftPackageReference "../Features/SaveJourney" */,
- DD0194F52B25C448007CE082 /* XCLocalSwiftPackageReference "../Features/SelectSong" */,
- DD0194F82B25C44E007CE082 /* XCLocalSwiftPackageReference "../Features/Spot" */,
- DDBB292B2B310B1300A742CD /* XCLocalSwiftPackageReference "../MSCoreKit" */,
);
productRefGroup = DD73F8562B024C4900EE9BF2 /* Products */;
projectDirPath = "";
@@ -227,7 +205,6 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
- DDB22F752B433EC300F83D84 /* CoordinatorFinishDelegate.swift in Sources */,
08CBF8792B18468E007D3797 /* AppCoordinator.swift in Sources */,
08CBF87F2B18468E007D3797 /* Coordinator.swift in Sources */,
08CBF87D2B18468E007D3797 /* SpotCoordinator.swift in Sources */,
@@ -236,6 +213,7 @@
DD73F8592B024C4900EE9BF2 /* AppDelegate.swift in Sources */,
08CBF87B2B18468E007D3797 /* HomeCoordinator.swift in Sources */,
DD73F85B2B024C4900EE9BF2 /* SceneDelegate.swift in Sources */,
+ DD72AF642B4B89E700EB4E81 /* CoordinatorFinishDelegate.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -594,89 +572,38 @@
};
/* End XCConfigurationList section */
-/* Begin XCLocalSwiftPackageReference section */
- DD0194E72B25C42E007CE082 /* XCLocalSwiftPackageReference "../Features/Home" */ = {
- isa = XCLocalSwiftPackageReference;
- relativePath = ../Features/Home;
- };
- DD0194EC2B25C434007CE082 /* XCLocalSwiftPackageReference "../Features/JourneyList" */ = {
- isa = XCLocalSwiftPackageReference;
- relativePath = ../Features/JourneyList;
- };
- DD0194EF2B25C43B007CE082 /* XCLocalSwiftPackageReference "../Features/RewindJourney" */ = {
- isa = XCLocalSwiftPackageReference;
- relativePath = ../Features/RewindJourney;
- };
- DD0194F22B25C441007CE082 /* XCLocalSwiftPackageReference "../Features/SaveJourney" */ = {
- isa = XCLocalSwiftPackageReference;
- relativePath = ../Features/SaveJourney;
- };
- DD0194F52B25C448007CE082 /* XCLocalSwiftPackageReference "../Features/SelectSong" */ = {
- isa = XCLocalSwiftPackageReference;
- relativePath = ../Features/SelectSong;
- };
- DD0194F82B25C44E007CE082 /* XCLocalSwiftPackageReference "../Features/Spot" */ = {
- isa = XCLocalSwiftPackageReference;
- relativePath = ../Features/Spot;
- };
- DDBB292B2B310B1300A742CD /* XCLocalSwiftPackageReference "../MSCoreKit" */ = {
- isa = XCLocalSwiftPackageReference;
- relativePath = ../MSCoreKit;
- };
-/* End XCLocalSwiftPackageReference section */
-
/* Begin XCSwiftPackageProductDependency section */
- DD0194E82B25C42E007CE082 /* Home */ = {
+ DD92FEAA2B35EDFF00A672F5 /* Home */ = {
isa = XCSwiftPackageProductDependency;
productName = Home;
};
- DD0194EA2B25C42E007CE082 /* NavigateMap */ = {
+ DD92FEAC2B35EE0700A672F5 /* NavigateMap */ = {
isa = XCSwiftPackageProductDependency;
productName = NavigateMap;
};
- DD0194ED2B25C434007CE082 /* JourneyList */ = {
+ DD92FEAE2B35EE0700A672F5 /* JourneyList */ = {
isa = XCSwiftPackageProductDependency;
productName = JourneyList;
};
- DD0194F02B25C43B007CE082 /* RewindJourney */ = {
+ DD92FEB02B35EE0700A672F5 /* RewindJourney */ = {
isa = XCSwiftPackageProductDependency;
productName = RewindJourney;
};
- DD0194F32B25C441007CE082 /* SaveJourney */ = {
- isa = XCSwiftPackageProductDependency;
- productName = SaveJourney;
- };
- DD0194F62B25C448007CE082 /* SelectSong */ = {
+ DD92FEB22B35EE0700A672F5 /* SelectSong */ = {
isa = XCSwiftPackageProductDependency;
productName = SelectSong;
};
- DD0194F92B25C44E007CE082 /* Spot */ = {
+ DD92FEB42B35EE0700A672F5 /* Spot */ = {
isa = XCSwiftPackageProductDependency;
productName = Spot;
};
- DDBB292C2B310B1300A742CD /* MSCacheStorage */ = {
- isa = XCSwiftPackageProductDependency;
- productName = MSCacheStorage;
- };
- DDBB292E2B310B1300A742CD /* MSFetcher */ = {
- isa = XCSwiftPackageProductDependency;
- productName = MSFetcher;
- };
- DDBB29302B310B1300A742CD /* MSImageFetcher */ = {
+ DD92FEB72B35EE5500A672F5 /* MSUIKit */ = {
isa = XCSwiftPackageProductDependency;
- productName = MSImageFetcher;
+ productName = MSUIKit;
};
- DDBB29322B310B1300A742CD /* MSKeychainStorage */ = {
+ DD92FEB92B35EEAF00A672F5 /* SaveJourney */ = {
isa = XCSwiftPackageProductDependency;
- productName = MSKeychainStorage;
- };
- DDBB29342B310B1300A742CD /* MSNetworking */ = {
- isa = XCSwiftPackageProductDependency;
- productName = MSNetworking;
- };
- DDBB29362B310B1300A742CD /* MSPersistentStorage */ = {
- isa = XCSwiftPackageProductDependency;
- productName = MSPersistentStorage;
+ productName = SaveJourney;
};
/* End XCSwiftPackageProductDependency section */
};