Skip to content

Comments

Feat/#213 sprint shapekim98#214

Open
ShapeKim98 wants to merge 7 commits intodevelopfrom
feat/#213-sprint-shapekim98
Open

Feat/#213 sprint shapekim98#214
ShapeKim98 wants to merge 7 commits intodevelopfrom
feat/#213-sprint-shapekim98

Conversation

@ShapeKim98
Copy link
Contributor

#️⃣연관된 이슈

#213

📝작업 내용

SchemeRoute(직접 제작/배포 라이브러리)를 통해 URL을 열거형으로 변환하고, DeeplinkRouteClient를 중심으로 딥링크 화면 플로우를 통합 관리하도록 구조를 개편했습니다.

  • CoreKit 딥링크 계층 추가
  • AppDelegateFeature/MainTabFeature/PokitAlertBoxFeature 라우팅 통합
  • Alert DTO/Domain에 deeplink 필드 추가
  • Unit/UI 테스트 추가 및 fastlane/match 테스트 타겟 등록 확장

SchemeRoute 라이브러리 설명 (간단)

SchemeRoute직접 제작해서 배포 중인 매크로 기반 URL 라우팅 라이브러리입니다.
@SchemeRoutable, @SchemePattern으로 URL 패턴을 열거형 케이스에 선언적으로 매핑해 문자열 분기 코드를 줄이고 타입 안전성을 높였습니다.

샘플 코드 1) URL -> Enum 파싱 정의

@SchemeRoutable
enum PokitDeeplink: Equatable, Sendable {
    static var scheme: String { "pokit" }

    @SchemePattern("shared?categoryId=${categoryId}&contentId=${contentId}&userId=${userId}")
    case shared(categoryId: Int?, contentId: Int?, userId: Int?)

    @SchemePattern("alert")
    case alert
}

샘플 코드 2) DeeplinkRouteClient 사용 방식

@Dependency(DeeplinkRouteClient.self) var deeplinkRouter

// URL 유입 지점
await deeplinkRouter.routeTo(url)

// 화면 플로우 처리 지점
for await route in deeplinkRouter.routeStream() {
    switch route {
    case let .pokitShared(categoryId, contentId, userId):
        // 카테고리 이동/시트 오픈 처리
    case let .kakaoSharedCategory(categoryId, shareType):
        // 공유 카테고리 진입 처리
    case .pokitAlert:
        // 알림함 이동
    }
}

새 Router 사용 가이드

  1. URL 유입 지점(AppDelegate, onOpenURL, 알림 클릭)에서는 routeTo(url:)만 호출
  2. 화면 전환 책임(MainTab)에서는 routeStream()만 구독
  3. 구독자가 없으면 내부 큐에 적재되고, 구독 시작 시 순차 소비
  4. 다중 구독자에게 동일 route 브로드캐스트

테스트 코드 작성 이유

서버 기능이 아직 완성되지 않아, 테스트 전용 더미 의존성(mainTabDeeplinkTestValue)으로 딥링크 플로우를 선검증했습니다.

프로비저닝 업데이트 방법 (팀원 실행용)

테스트 타깃이 추가되어 프로비저닝 업데이트가 필요합니다.

fastlane ios development_profile
fastlane ios appstore_profile

테스트 시나리오 요약

  • Router: 큐잉/FIFO/브로드캐스트
  • MainTab/AppDelegate/PokitAlertBox: 딥링크 분기 + fallback
  • AppUITests:
    • pokit://shared?categoryId=...
    • pokit://shared?categoryId=...&contentId=...
    • pokit://shared?categoryId=...&userId=...
    • MainTab 진입 전 routeTo
    • same category no-push / different category append

스크린샷 (선택)

  • 없음

💬리뷰 요구사항(선택)

아래 항목 중심으로 확인 부탁드립니다.

  1. SchemeRoute 패턴 정의와 실제 딥링크 스펙 일치 여부
  2. routeTo -> routeStream -> 화면 전환 책임 분리의 적절성
  3. same category no-push / different category append 정책 반영 여부
  4. 서버 미완성 상태에서의 테스트 더미 범위 적절성

close #213

@ShapeKim98 ShapeKim98 requested a review from stealmh February 20, 2026 15:06
@ShapeKim98 ShapeKim98 self-assigned this Feb 20, 2026
@ShapeKim98 ShapeKim98 added the Feat 기능구현 label Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feat 기능구현

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant