- 첫 화면 우하단 ? 버튼 → 도움말(5그룹 13주제 — 기본 사용법·통계·앱 밖에서·애플워치·설정 기타) - String Catalog ko(원문)/en/ja 3타깃(iOS 98·워치 15·위젯 9키) 전수 번역, InfoPlist 표시 이름 포함 - 설정 → 언어(시스템/한국어/English/日本語) — AppleLanguages 오버라이드, 재실행 시 적용(하루 다님 방식) - 검증: Debug·Release·워치 빌드 그린, missing·stale 0, en/ja/ko 화면 QA 7장(도움말·설정·세팅·통계·워치) - DEBUG 인자 추가: -openHelp/-openSettings/-openTimerSettings/-resetConfig Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UPmp29DQHY6Ahfss5SRopT
44 lines
1.6 KiB
Swift
44 lines
1.6 KiB
Swift
//
|
|
// DebugSeed.swift
|
|
// Keging
|
|
//
|
|
// 검증용 런치 인자 (DEBUG 전용) — CLAUDE.md §14
|
|
// -seedStats: 지난 35일 결정적 가짜 기록으로 교체 (통계 화면 QA)
|
|
//
|
|
|
|
#if DEBUG
|
|
import Foundation
|
|
|
|
@MainActor
|
|
enum DebugSeed {
|
|
static func applyLaunchArguments() {
|
|
if CommandLine.arguments.contains("-seedStats") { seedStats() }
|
|
// 완주 경로 검증용 초단축 세팅 (수축 1초·이완 1초·2회)
|
|
if CommandLine.arguments.contains("-quickConfig") {
|
|
SettingsStore.shared.config = WorkoutConfig(contractSeconds: 1, relaxSeconds: 1, reps: 2)
|
|
}
|
|
// 기본 세팅 복원
|
|
if CommandLine.arguments.contains("-resetConfig") {
|
|
SettingsStore.shared.config = WorkoutConfig()
|
|
}
|
|
}
|
|
|
|
private static func seedStats() {
|
|
let calendar = Calendar.current
|
|
let today = calendar.startOfDay(for: Date())
|
|
var records: [SessionRecord] = []
|
|
for dayOffset in 0..<35 {
|
|
guard let day = calendar.date(byAdding: .day, value: -dayOffset, to: today) else { continue }
|
|
let sets = (dayOffset * 7 + 3) % 4 // 0~3세트 결정적 패턴
|
|
for index in 0..<sets {
|
|
let hour = [8, 13, 21][index % 3]
|
|
let minute = (dayOffset * 11 + index * 17) % 60
|
|
guard let start = calendar.date(bySettingHour: hour, minute: minute, second: 0, of: day) else { continue }
|
|
records.append(SessionRecord(startedAt: start, reps: 20, contractSeconds: 10, relaxSeconds: 5))
|
|
}
|
|
}
|
|
RecordStore.shared._replaceAll(records)
|
|
}
|
|
}
|
|
#endif
|