Skip to content

ExampleApp의 SwiftUI MVVM·Preview 빌드 전용 검증을 구현한다 - #32

Merged
opficdev merged 16 commits into
developfrom
feat/#30
Sep 4, 2026
Merged

opficdev merged 16 commits into
developfrom
feat/#30

Conversation

@opficdev

@opficdev opficdev commented Sep 4, 2026

Copy link
Copy Markdown
Owner

🔗 연관된 이슈

🎯 작업 목적

Cradle의 sources graph 조합과 @External 생성 메서드를 일반 SwiftUI MVVM 구조에서 컴파일로 검증할 ExampleApp 구성.

이슈 본문의 다중 모듈 요구는 소유자 합의에 따라 app target 하나와 실제 폴더 책임으로 대체. GitHub 이슈 본문은 변경하지 않음.

📝 작업 내용

📌 요약

  • iOS 17·Swift 6 기반 ExampleApp project와 공유 scheme 추가
  • App, Domain, Data, Presentation, AppComposition 폴더 기반 Clean Architecture 예제 구성
  • Persistence 우선·Infra 대체 조회를 구현한 ProductRepository graph 조합 추가
  • @External ProductID로 ProductDetailViewModel을 생성하는 AppGraph와 ExampleAppComposition 추가
  • 기본 Preview와 Persistence leaf override Preview의 독립 graph 조립 추가
  • 모든 pull request에서 실행하는 ExampleApp Build CI 추가

🔍 상세

  • Domain에 Product, ProductID, ProductRepository, LoadProductUseCase 구성
  • Data/Persistence의 비어 있는 기본 저장소와 Data/Infra의 결정적인 상품 응답 구성
  • DataGraph에서 Persistence 결과를 먼저 사용하고 값이 없을 때 Infra 응답을 Product로 변환하는 비공개 DefaultProductRepository 구성
  • ProductDetailViewModel의 @MainActor, ObservableObject, @Published 상태와 ProductDetailView의 @StateObject 소유권 구성
  • ExampleAppComposition이 leaf graph부터 DataGraph, AppGraph까지 조립하고 graph만 보유하는 Composition Root 구성
  • @Provide(.transient)와 @External ProductID로 호출마다 ViewModel을 생성하고 graph·Factory가 결과를 저장하지 않는 흐름 구성
  • Preview마다 Persistence·Infra·Data·App graph와 ViewModel을 새로 만들고, 교체 Preview는 PersistenceGraph.override(...).build()를 직접 적용하는 구성
  • ExampleApp Build job에서 generic iOS Simulator destination과 CODE_SIGNING_ALLOWED=NO build만 수행하고 build log artifact를 보존하는 CI 구성

✅ 검증

  • xcodebuild -list -project Examples/ExampleApp/ExampleApp.xcodeproj
  • xcodebuild -project Examples/ExampleApp/ExampleApp.xcodeproj -scheme ExampleApp -configuration Debug -destination 'generic/platform=iOS Simulator' CODE_SIGNING_ALLOWED=NO build
  • swift build
  • swift test — Swift Testing 236개와 XCTest 2개 통과
  • 변경 Swift 파일 14개 SwiftLint 위반 없음
  • YAML 구문 검사와 git diff --check
  • 앱 실행·설치, Simulator boot, Preview render — 범위 제외
  • 원격 CI 실행 — push 전 미수행

🔄 변경 흐름

flowchart TB
    app[ExampleApp] --> composition[ExampleAppComposition]
    composition --> persistence[PersistenceGraph]
    composition --> infra[InfraGraph]
    persistence --> data[DataGraph]
    infra --> data
    data --> repository[ProductRepository]
    repository --> useCase[LoadProductUseCase]
    useCase --> appGraph[AppGraph]
    input[ProductID] --> appGraph
    appGraph --> viewModel[ProductDetailViewModel]
    viewModel --> view[ProductDetailView]

    previewOverride[PersistenceGraph override build] --> previewData[Preview DataGraph]
    previewInfra[Preview InfraGraph] --> previewData
    previewData --> previewRepository[Preview ProductRepository]
    previewRepository --> previewUseCase[Preview LoadProductUseCase]
    previewUseCase --> previewGraph[Preview AppGraph]
    previewInput[Preview ProductID] --> previewGraph
    previewGraph --> previewModel[Preview ProductDetailViewModel]
    previewModel --> previewView[Preview ProductDetailView]
Loading

@opficdev opficdev self-assigned this Sep 4, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-04T10:52:25.335074Z c8a68e7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@opficdev
opficdev merged commit 6ff8e3d into develop Sep 4, 2026
5 checks passed
@opficdev
opficdev deleted the feat/#30 branch September 4, 2026 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ExampleApp의 SwiftUI MVVM·Preview 빌드 전용 검증을 구현한다

1 participant