Files
sodalive-ios/docs/20260327_라이브생성콘텐츠업로드연령제한표시조건수정.md

4.5 KiB

20260327 라이브 생성·콘텐츠 업로드 연령제한 표시 조건 수정

개요

  • 라이브 생성 페이지와 콘텐츠 업로드 페이지의 연령제한 설정 UI 표시 조건을 정책에 맞게 통일한다.
  • 표시 조건은 isAdultContentVisible를 필수로 하고, 접속국가가 한국(KR 또는 빈값)일 때만 isAuth를 추가로 요구한다.

요구사항 요약

  • 대상 화면:
    • 라이브 생성 (LiveRoomCreateView)
    • 콘텐츠 업로드 (ContentCreateView)
  • 표시 조건:
    • 필수: isAdultContentVisible == true
    • 추가: 접속국가가 한국이면 isAuth == true

완료 기준 (Acceptance Criteria)

  • AC1: 라이브 생성 화면 연령제한 설정 UI가 isAdultContentVisible == true일 때만 표시된다.
  • AC2: 라이브 생성 화면에서 접속국가가 한국이면 isAuth == true일 때만 연령제한 설정 UI가 표시된다.
  • AC3: 콘텐츠 업로드 화면 연령제한 설정 UI가 동일 조건(isAdultContentVisible 필수 + 한국일 때 isAuth 추가)으로 표시된다.
  • AC4: 국가코드 판별은 기존 관례(공백 제거 + 대문자, 빈값은 한국 취급)를 따른다.
  • AC5: 수정 파일 진단, 빌드/테스트 결과와 한계를 문서 하단 검증 기록에 남긴다.

구현 체크리스트

  • 라이브 생성/콘텐츠 업로드 기존 UI 분기 코드 위치 확인
  • 공통 표시 조건 계산식 정의 (isAdultContentVisible, isKoreanCountry, isAuth)
  • 라이브 생성 화면 조건 적용
  • 콘텐츠 업로드 화면 조건 적용
  • 수정 파일 진단 및 워크스페이스 빌드/테스트 실행
  • 문서 체크리스트/검증 기록 업데이트

검증 계획

  • 정적 진단: lsp_diagnostics (수정 파일 전체)
  • 빌드:
    • 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

    • 무엇: 라이브 생성/콘텐츠 업로드 연령제한 UI 표시 조건 수정 계획 문서 작성
    • 왜: 구현 범위와 완료 기준을 먼저 고정해 요청된 조건만 정확히 반영하기 위함
    • 어떻게: docs 규칙에 맞춰 요구사항, 완료 기준, 검증 계획을 체크리스트로 문서화
    • 실행 명령/도구: apply_patch(문서 생성)
    • 결과: 계획 문서 생성 완료
  • 일시: 2026-03-27

    • 무엇: 라이브 생성/콘텐츠 업로드 연령제한 UI 표시 조건을 국가/설정 기반으로 수정 및 검증
    • 왜: 기존 조건(인증 기반 또는 무조건 노출)을 정책(isAdultContentVisible 필수 + 한국일 때 isAuth 필수)과 일치시키기 위함
    • 어떻게:
      • LiveRoomCreateViewisKoreanCountry, isAdultContentVisible, shouldShowAdultSetting 계산 추가 후 AdultSettingView 표시 분기 교체
      • ContentCreateView에 동일 계산 추가 후 연령 제한 섹션 전체를 if shouldShowAdultSetting으로 감싸 조건부 렌더링 적용
      • 국가코드는 기존 관례대로 trim + uppercased, 빈값은 한국 취급
    • 실행 명령/도구:
      • 진단: lsp_diagnostics(LiveRoomCreateView.swift), lsp_diagnostics(ContentCreateView.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
      • 로직 수동 검증(CLI): xcrun swift -e "import Foundation; ... shouldShow(...) ..."
    • 결과:
      • 두 스킴 Debug 빌드 모두 ** BUILD SUCCEEDED **
      • 테스트는 두 스킴 모두 Scheme ... is not currently configured for the test action으로 실행 불가
      • lsp_diagnostics는 SourceKit 환경에서 No such module 'Kingfisher'를 보고하지만, 실제 xcodebuild 통과로 컴파일 정상 확인
      • CLI 로직 검증 출력:
        • KR + visible=true + auth=true => true
        • KR + visible=true + auth=false => false
        • US + visible=true + auth=false => true
        • US + visible=false + auth=true => false