Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA
📝 작업 내용
📌 요약
DIContainer를 도입해,각 화면이 직접 생성하던 Mock Repository를 한 곳에서 조립하도록 정리했습니다.
print나 TODO로만 남아 있던 화면 전환 로직을 모두 실제 이동으로 연결했습니다.🔍 상세
1. DIContainer 도입
MockXXXRepository()를 화면 안에서 직접 생성하고 있었습니다.DIContainerregister(_:factory:)/register(_:instance:)/resolve(_:)를 제공하는 컨테이너입니다.resolve호출마다 새 인스턴스를 생성하고, instance 등록은 항상 같은 인스턴스를 반환합니다.fatalError로 크래시합니다(등록 누락을 개발 중 바로 드러내기 위함).AppDIContainer+RegisterCoreLocationRepository는AppDelegate에서 앱 시작 시DIContainer.shared.registerDependencies()를 호출합니다.MockXXXRepository()/CoreLocationRepository()를 직접 생성하던 부분을DIContainer.shared.resolve(...)로 교체했습니다.2. 미연결 화면 전환 로직 연결
print나 TODO 주석으로만 남아 있고 실제 화면 전환으로 이어져 있지 않았습니다.AppointmentDetailRepository에fetchAppointment(code:completion:)를 추가하고,MockAppointmentDetailRepository는 정해진 코드(MOCK1234)만 성공, 나머지는AppError.notFound로 실패하도록 구현했습니다.JoinAppointmentUseCase를 신규 작성했습니다(ID 조회용GetAppointmentDetailUseCase와 목적이 달라 UseCase는 분리, Repository는 공유).HomeViewControllerFetchAppointmentInfoUseCase로 약속 정보를 조회해 Chat으로 이동하도록 연결했습니다.JoinAppointmentUseCase로 코드를 검증해 성공 시 Chat으로 이동, 실패 시 알림을 띄우도록 연결했습니다.ChatViewControllerAppointmentRouteViewController)을 열도록 연결했습니다.ChatBubbleItem에 좌표 필드를 추가했습니다.AppointmentListViewController/PastAppointmentListViewControllerAppointmentRouteViewController/AppointmentRouteViewModelRouteSearchViewController)을 열도록 연결했습니다.AppointmentCreationViewController💬 리뷰 노트
1. register/resolve 방식의 DIContainer를 선택한 이유
AppDIContainer.makeXXXViewController()형태의 Factory 메서드2. UseCase는 등록하지 않고 Repository만 등록
3. 조립과 화면 전환이 여전히 ViewController 안에 있음