From 9d65077f3380b2928026a7813406c0e3f2bbca36 Mon Sep 17 00:00:00 2001 From: doyeonk429 <80318425+doyeonk429@users.noreply.github.com> Date: Thu, 9 Jul 2026 23:21:27 +0900 Subject: [PATCH 1/4] =?UTF-8?q?[#30]=20chore:=20TCA=20=EC=A0=81=EC=9A=A9?= =?UTF-8?q?=EC=9D=84=20=EC=9C=84=ED=95=9C=20=EB=AA=A8=EB=93=88=20=EC=9D=98?= =?UTF-8?q?=EC=A1=B4=EC=84=B1=20=EA=B7=B8=EB=9E=98=ED=94=84=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 - swift-composable-architecture 1.25.0 → 1.26.0 버전 업데이트 - TargetDependency에 .tca() 헬퍼 추가 - Devault, DVPresentation 타겟에 TCA 의존성 연결 --- Projects/DVPresentation/Project.swift | 4 ++++ Projects/Devault/Project.swift | 4 ++++ Tuist/Package.swift | 2 +- .../ProjectDescriptionHelpers/TargetDependency+External.swift | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Projects/DVPresentation/Project.swift b/Projects/DVPresentation/Project.swift index 68afb41..85f09d4 100644 --- a/Projects/DVPresentation/Project.swift +++ b/Projects/DVPresentation/Project.swift @@ -10,9 +10,13 @@ let project = Project.project( sources: .sources, resources: .default, dependencies: [ + // internal dependency .domain(), .design(), .core(), + + // 3rd-party dependency + .tca(), ] ), ] diff --git a/Projects/Devault/Project.swift b/Projects/Devault/Project.swift index 3feb11c..3102b99 100644 --- a/Projects/Devault/Project.swift +++ b/Projects/Devault/Project.swift @@ -13,10 +13,14 @@ let project = Project.project( sources: .sources, resources: .default, dependencies: [ + // internal dependency .presentation(), .data(), .domain(), .core(), + + // 3rd-party dependency + .tca(), ] ), ], diff --git a/Tuist/Package.swift b/Tuist/Package.swift index ca82a1c..df1de31 100644 --- a/Tuist/Package.swift +++ b/Tuist/Package.swift @@ -17,7 +17,7 @@ let package = Package( dependencies: [ .package( url: "https://github.com/pointfreeco/swift-composable-architecture", - from: "1.25.0" + from: "1.26.0" ), ] ) diff --git a/Tuist/ProjectDescriptionHelpers/TargetDependency+External.swift b/Tuist/ProjectDescriptionHelpers/TargetDependency+External.swift index 2ddac01..8a2d49f 100644 --- a/Tuist/ProjectDescriptionHelpers/TargetDependency+External.swift +++ b/Tuist/ProjectDescriptionHelpers/TargetDependency+External.swift @@ -10,4 +10,8 @@ extension TargetDependency { public static func external(dependency: External) -> TargetDependency { .external(name: dependency.rawValue, condition: .when([.macos])) } + + public static func tca() -> TargetDependency { + .external(dependency: .ComposableArchitecture) + } } From d00980109fef1375ed68a07a7b792fe94ab323c6 Mon Sep 17 00:00:00 2001 From: doyeonk429 <80318425+doyeonk429@users.noreply.github.com> Date: Thu, 9 Jul 2026 23:27:29 +0900 Subject: [PATCH 2/4] =?UTF-8?q?[#30]=20chore:=20TCA=20=EC=A0=81=EC=9A=A9?= =?UTF-8?q?=EC=9D=84=20=EC=9C=84=ED=95=9C=20Feature/Composition=20?= =?UTF-8?q?=ED=8F=B4=EB=8D=94=20=EA=B5=AC=EC=A1=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - DVPresentation에 Features 디렉토리 생성 (.gitkeep) - Devault에 Composition 디렉토리 생성 (.gitkeep) --- Projects/DVPresentation/Sources/Features/.gitkeep | 0 Projects/Devault/Sources/Composition/.gitkeep | 0 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 Projects/DVPresentation/Sources/Features/.gitkeep create mode 100644 Projects/Devault/Sources/Composition/.gitkeep diff --git a/Projects/DVPresentation/Sources/Features/.gitkeep b/Projects/DVPresentation/Sources/Features/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Projects/Devault/Sources/Composition/.gitkeep b/Projects/Devault/Sources/Composition/.gitkeep new file mode 100644 index 0000000..e69de29 From e6f1def3eeed7d5a13dc765cab8ad32ad943d784 Mon Sep 17 00:00:00 2001 From: doyeonk429 <80318425+doyeonk429@users.noreply.github.com> Date: Thu, 9 Jul 2026 23:32:17 +0900 Subject: [PATCH 3/4] =?UTF-8?q?[#30]=20feat:=20TCA=20=EB=A3=A8=ED=8A=B8=20?= =?UTF-8?q?AppFeature/AppView=20=EC=8A=A4=EC=BA=90=ED=8F=B4=EB=93=9C=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 - AppFeature Reducer 초기 구조 추가 (State, Action, Delegate) - AppView 초기 뷰 구현 및 task 액션 연결 --- .../Sources/Features/AppFeature.swift | 52 +++++++++++++++++++ .../Sources/Features/AppView.swift | 46 ++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 Projects/DVPresentation/Sources/Features/AppFeature.swift create mode 100644 Projects/DVPresentation/Sources/Features/AppView.swift diff --git a/Projects/DVPresentation/Sources/Features/AppFeature.swift b/Projects/DVPresentation/Sources/Features/AppFeature.swift new file mode 100644 index 0000000..1fec354 --- /dev/null +++ b/Projects/DVPresentation/Sources/Features/AppFeature.swift @@ -0,0 +1,52 @@ +// Copyright © 2026 Devault. All rights reserved + +import Foundation + +import ComposableArchitecture + +// MARK: - AppFeature + +@Reducer +public struct AppFeature { + + // MARK: - State + + @ObservableState + public struct State: Equatable { + + public init() {} + } + + // MARK: - Action + + public enum Action: Equatable { + + // MARK: - View + + case task + + // MARK: - Delegate + + case delegate(Delegate) + + public enum Delegate: Equatable {} + } + + // MARK: - Init + + public init() {} + + // MARK: - Body + + public var body: some ReducerOf { + Reduce { state, action in + switch action { + case .task: + return .none + + case .delegate: + return .none + } + } + } +} diff --git a/Projects/DVPresentation/Sources/Features/AppView.swift b/Projects/DVPresentation/Sources/Features/AppView.swift new file mode 100644 index 0000000..5c73493 --- /dev/null +++ b/Projects/DVPresentation/Sources/Features/AppView.swift @@ -0,0 +1,46 @@ +// Copyright © 2026 Devault. All rights reserved + +import SwiftUI + +import ComposableArchitecture + +// MARK: - AppView + +public struct AppView: View { + + // MARK: - Properties + + @Bindable public var store: StoreOf + + // MARK: - Init + + public init(store: StoreOf) { + self.store = store + } + + // MARK: - Body + + public var body: some View { + content + .task { store.send(.task) } + } +} + +// MARK: - Subviews + +extension AppView { + + private var content: some View { + Text("Devault") + } +} + +// MARK: - Preview + +#Preview { + AppView( + store: Store(initialState: AppFeature.State()) { + AppFeature() + } + ) +} From b65e102985682ddd031692a9729ea27652784f7b Mon Sep 17 00:00:00 2001 From: doyeonk429 <80318425+doyeonk429@users.noreply.github.com> Date: Thu, 9 Jul 2026 23:35:33 +0900 Subject: [PATCH 4/4] =?UTF-8?q?[#30]=20refactor:=20DevaultApp=20=EC=A7=84?= =?UTF-8?q?=EC=9E=85=EC=A0=90=EC=9D=84=20AppFeature=20=EA=B8=B0=EB=B0=98?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EC=9E=AC=EB=B0=B0=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - LocalStorage 초기화·성공/실패 분기를 진입점에서 제거 - ComposableArchitecture Store로 AppFeature/AppView를 호스팅 - Storage 초기화는 향후 AppInfrastructure/AppFeature.State 도입 시 재구성 예정 - ContentView / StorageUnavailableView는 참조 해제 (후속 커밋에서 정리) --- Projects/Devault/Sources/DevaultApp.swift | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/Projects/Devault/Sources/DevaultApp.swift b/Projects/Devault/Sources/DevaultApp.swift index 686ad83..69316e6 100644 --- a/Projects/Devault/Sources/DevaultApp.swift +++ b/Projects/Devault/Sources/DevaultApp.swift @@ -1,24 +1,17 @@ -import DVData import SwiftUI +import ComposableArchitecture +import DVPresentation + @main struct DevaultApp: App { - private let storageResult: Result - - init() { - self.storageResult = Result { - try LocalStorage.makeDefault() - } - } - var body: some Scene { WindowGroup { - switch storageResult { - case let .success(storage): - ContentView(storage: storage) - case let .failure(error): - StorageUnavailableView(error: error) - } + AppView( + store: Store(initialState: AppFeature.State()) { + AppFeature() + } + ) } } }