Files
sodalive-ios/docs/20260327_마이페이지본인인증아이템국가조건적용.md

4.8 KiB

20260327 마이페이지 본인인증 아이템 국가 조건 적용

개요

  • MyPageView의 카테고리 버튼 중 본인인증/인증완료 아이템을 접속국가가 한국(KR)인 경우에만 노출되도록 변경한다.
  • 기존 인증 플로우(Bootpay 호출, 인증 상태 문구)는 한국 사용자에서만 기존대로 유지한다.

요구사항 요약

  • 대상 파일: SodaLive/Sources/MyPage/MyPageView.swift
  • 변경 조건:
    • 접속국가 코드가 KR(정규화 기준 적용)일 때만 본인인증/인증완료 아이템 표시
    • 국가코드 미수신(빈값) 시 기존 저장소 관례에 맞춰 한국 정책(KR)으로 취급
    • KR이 아니면 해당 아이템 미표시

완료 기준 (Acceptance Criteria)

  • AC1: MyPageView에서 접속국가 코드 정규화(trim + uppercased)가 적용된다.
  • AC2: CategoryButtonsView본인인증/인증완료 아이템이 한국 사용자에게만 노출된다.
  • AC3: 한국 사용자의 기존 인증 플로우(isShowAuthView = true)가 유지된다.
  • AC4: 빌드/진단 검증 결과가 문서에 기록된다.

구현 체크리스트

  • MyPageView에서 국가코드 기반 불리언(isKoreanCountry) 계산 로직 추가
  • CategoryButtonsView에 국가코드 조건 전달 파라미터 추가
  • 카테고리 그리드의 본인인증/인증완료 아이템 KR 조건부 렌더링 적용
  • 수정 파일 진단 및 워크스페이스 빌드/테스트 명령 실행
  • 검증 결과 문서화

검증 계획

  • 정적 진단: lsp_diagnostics("SodaLive/Sources/MyPage/MyPageView.swift")
  • 빌드: xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build
  • 빌드(개발): xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build
  • 테스트 시도:
    • xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" test
    • xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" test

검증 기록

  • 일시: 2026-03-27

    • 무엇: 마이페이지 본인인증 아이템 국가 조건 적용 작업 계획 문서 작성
    • 왜: 구현 전 변경 범위와 검증 절차를 체크리스트 기반으로 고정하기 위함
    • 어떻게: 기존 docs 문서 포맷을 기준으로 요구사항/완료기준/검증계획을 정리
    • 실행 명령/도구: read(docs/), apply_patch(문서 생성)
    • 결과: 구현용 계획 문서 초안 생성 완료
  • 일시: 2026-03-27

    • 무엇: 마이페이지 본인인증/인증완료 아이템 KR 조건부 노출 구현 및 검증
    • 왜: 비한국 접속국가에서 해당 아이템이 노출되지 않도록 정책을 적용하기 위함
    • 어떻게:
      • MyPageView에서 countryCodetrim + uppercased로 정규화하고 isKoreanCountry = normalizedCountryCode.isEmpty || normalizedCountryCode == "KR" 계산
      • CategoryButtonsViewisKoreanCountry 전달 파라미터를 추가하고, ic_my_auth 아이템을 if isKoreanCountry로 감싸 조건부 렌더링
      • 사용자 요청 search-mode에 맞춰 explore/librarian 병렬 탐색 + Grep/ast-grep 직접 탐색 결과를 교차 검증
    • 실행 명령/도구:
      • Background agents:
        • task(subagent_type="explore", description="Find KR gating patterns")
        • task(subagent_type="explore", description="Trace MyPage auth item")
        • task(subagent_type="librarian", description="Find SwiftUI conditional item patterns")
        • task(subagent_type="librarian", description="Find locale/country code handling examples")
      • Direct search:
        • grep("본인인증|인증완료|ic_my_auth", MyPageView.swift)
        • ast_grep_search("CategoryButtonItem(icon: \"ic_my_auth\", title: $TITLE) { $$$ }", lang: "swift")
        • rg 시도(command not found: rg)로 환경 미설치 확인
      • 검증:
        • lsp_diagnostics("SodaLive/Sources/MyPage/MyPageView.swift")
        • xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build
        • xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build
        • xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" test
        • xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" test
    • 결과:
      • SodaLive / SodaLive-dev Debug 빌드 모두 BUILD SUCCEEDED
      • 테스트는 두 스킴 모두 Scheme ... is not currently configured for the test action으로 실행 불가(테스트 액션 미구성)
      • lsp_diagnostics는 SourceKit 환경에서 No such module 'Bootpay'를 보고했으나, 실제 xcodebuild 통과로 컴파일 정상 확인
      • 수동 QA는 현재 CLI 환경 한계로 미실행(실기기/시뮬레이터에서 KR/non-KR 노출 확인 필요)