feat: M2-M4 完成,添加 AI 增强、设计系统、App Store 准备
新增功能: - AI 超分辨率模块 (Real-ESRGAN Core ML) - Soft UI 设计系统 (DesignSystem.swift) - 设置页、隐私政策页、引导页 - 最近作品管理器 App Store 准备: - 完善截图 (iPhone 6.7"/6.5", iPad 12.9") - App Store 元数据文档 - 修复应用图标 alpha 通道 - 更新显示名称为 Live Photo Studio 工程配置: - 配置 Git LFS 跟踪 mlmodel 文件 - 添加 Claude skill 开发指南 - 更新 .gitignore 规则 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
108
.claude/skills/live-photo-studio/SKILL.md
Normal file
108
.claude/skills/live-photo-studio/SKILL.md
Normal file
@@ -0,0 +1,108 @@
|
||||
---
|
||||
name: live-photo-studio
|
||||
description: Live Photo Studio 开发指南。将视频转换为 Live Photo 并设置为动态壁纸。SwiftUI + Core ML + Soft UI。
|
||||
---
|
||||
|
||||
# Live Photo Studio
|
||||
|
||||
## 项目信息
|
||||
|
||||
| 属性 | 值 |
|
||||
|-----|-----|
|
||||
| **Bundle ID** | `xyz.let5see.livephotomaker` |
|
||||
| **App Store 名称** | Live Photo Studio |
|
||||
| **最低支持** | iOS/iPadOS 18.0 |
|
||||
| **技术栈** | SwiftUI + Swift Concurrency + Core ML |
|
||||
|
||||
## 项目结构
|
||||
|
||||
```
|
||||
to-live-photo/
|
||||
├── Sources/LivePhotoCore/ # 核心库(Swift Package)
|
||||
│ ├── LivePhotoCore.swift # WorkItem, ExportParams, Builder
|
||||
│ ├── AIEnhancer/ # AI 超分辨率
|
||||
│ └── Resources/ # Core ML 模型
|
||||
├── to-live-photo/to-live-photo/ # 主应用
|
||||
│ ├── Views/ # HomeView → EditorView → ProcessingView → ResultView → WallpaperGuideView
|
||||
│ ├── AppState.swift # 全局状态
|
||||
│ ├── DesignSystem.swift # Soft UI 设计系统
|
||||
│ └── Analytics.swift # 埋点
|
||||
└── docs/ # APP_STORE_METADATA.md, TEST_MATRIX.md
|
||||
```
|
||||
|
||||
## 设计令牌(DesignSystem.swift)
|
||||
|
||||
```swift
|
||||
// 间距
|
||||
DesignTokens.Spacing.sm // 8pt
|
||||
DesignTokens.Spacing.md // 12pt
|
||||
DesignTokens.Spacing.lg // 16pt
|
||||
DesignTokens.Spacing.xl // 20pt
|
||||
|
||||
// 圆角
|
||||
DesignTokens.Radius.md // 12pt
|
||||
DesignTokens.Radius.lg // 16pt
|
||||
DesignTokens.Radius.xl // 24pt
|
||||
|
||||
// 颜色(自动适配深色模式)
|
||||
Color.softBackground // 主背景
|
||||
Color.softCard // 卡片
|
||||
Color.textPrimary // 主文字
|
||||
Color.textSecondary // 次文字
|
||||
Color.accentPurple // 强调色 #6366F1
|
||||
Color.gradientPrimary // 主渐变
|
||||
```
|
||||
|
||||
## 核心 API(LivePhotoCore)
|
||||
|
||||
```swift
|
||||
// 配置
|
||||
struct ExportParams {
|
||||
var duration: Double = 0.917 // 标准时长
|
||||
var keyFrameTime: Double = 0.5 // 封面帧位置
|
||||
var aspectRatio: AspectRatio // 宽高比
|
||||
var hdrPolicy: HDRPolicy = .toneMapToSDR
|
||||
var codecPolicy: CodecPolicy = .fallbackH264
|
||||
var aiEnhanceConfig: AIEnhanceConfig?
|
||||
}
|
||||
|
||||
// 生成阶段
|
||||
enum LivePhotoBuildStage {
|
||||
case normalize, aiEnhance, extractKeyFrame
|
||||
case writePhotoMetadata, writeVideoMetadata
|
||||
case saveToAlbum, validate
|
||||
}
|
||||
```
|
||||
|
||||
## 错误码
|
||||
|
||||
| 错误码 | 含义 | 建议 |
|
||||
|-------|------|------|
|
||||
| LPB-001 | 导入失败 | 检查格式 |
|
||||
| LPB-101 | 标准化失败 | 开启兼容模式 |
|
||||
| LPB-401 | 保存失败 | 检查权限 |
|
||||
| LPB-501 | AI 增强失败 | 静默降级 |
|
||||
|
||||
## 开发检查清单
|
||||
|
||||
**新增 View:**
|
||||
- [ ] 状态机(loading/error/content)
|
||||
- [ ] 触控目标 ≥ 44pt
|
||||
- [ ] accessibilityLabel
|
||||
- [ ] iPad 适配
|
||||
- [ ] 深色模式
|
||||
|
||||
**发布前:**
|
||||
- [ ] 图标无 alpha 通道
|
||||
- [ ] 版本号更新
|
||||
- [ ] 截图尺寸正确
|
||||
|
||||
## 常用命令
|
||||
|
||||
```bash
|
||||
# 构建
|
||||
xcodebuild -scheme to-live-photo -destination 'platform=iOS Simulator,name=iPhone 16 Pro' build
|
||||
|
||||
# Archive
|
||||
xcodebuild -scheme to-live-photo -configuration Release -destination 'generic/platform=iOS' -archivePath build/to-live-photo.xcarchive archive
|
||||
```
|
||||
Reference in New Issue
Block a user