重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
ios-app-store-submission by kimny1143/claude-code-template
npx skills add https://github.com/kimny1143/claude-code-template --skill ios-app-store-submission本地构建 → App Store Connect 上传 → TestFlight / 审核提交的完整工作流程。
# 确认要构建哪个应用
ls -d */app.json
# → muednote-mobile/app.json, muedear/app.json
| 目的 | 分支 |
|---|---|
| App Store 审核提交 | main |
| TestFlight 测试 | 功能分支 OK |
git branch --show-current
git status
# 从 app.json 确认当前的 version 和 buildNumber
cat <APP_DIR>/app.json | grep -E '"version"|"buildNumber"'
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
规则:
version: 显示在 App Store 上的版本(例如: 0.8.4)buildNumber: 在同一 version 内必须唯一。始终设为现有最大值 + 1重要: .env 的值不是在 prebuild 时注入,而是在 xcodebuild archive 时由 Metro bundler 注入。
# 确认当前的 .env
cat <APP_DIR>/.env
# 备份(仅首次)
cp <APP_DIR>/.env <APP_DIR>/.env.backup
| 用途 | CLERK_KEY | API_URL |
|---|---|---|
| 生产 (App Store) | pk_live_... | https://mued.jp |
| 测试 (TestFlight) | pk_test_... | preview deploy URL |
TestFlight 构建时:
# 将 .env 更改为 TestFlight 用
# EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
# EXPO_PUBLIC_API_URL=https://<preview-url>.vercel.app
生产构建时:
# 确认 .env 为生产值
# EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_...
# EXPO_PUBLIC_API_URL=https://mued.jp
构建后必须恢复为生产值:
cp <APP_DIR>/.env.backup <APP_DIR>/.env
cd <APP_DIR>
npm install
npx expo prebuild --clean
--clean 会删除 ios/ 并重新生成。建议始终加上。
xcodebuild -workspace ios/<SCHEME>.xcworkspace \
-scheme <SCHEME> \
-configuration Release \
-archivePath build/<SCHEME>.xcarchive \
-destination "generic/platform=iOS" \
DEVELOPMENT_TEAM=F529L4WT3V \
CODE_SIGN_STYLE=Automatic \
-allowProvisioningUpdates \
archive
各应用对应的值:
| 应用 | SCHEME | workspace |
|---|---|---|
| MUEDnote | MUEDnote | ios/MUEDnote.xcworkspace |
| MUEDear | MUEDear | ios/MUEDear.xcworkspace |
xcodebuild -exportArchive \
-archivePath build/<SCHEME>.xcarchive \
-exportPath build \
-exportOptionsPlist ExportOptions.plist \
-allowProvisioningUpdates
如果没有 -allowProvisioningUpdates,会出现 "No profiles found" 错误。
已放置在各应用目录。如果没有,请创建:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>app-store-connect</string>
<key>signingStyle</key>
<string>automatic</string>
<key>teamID</key>
<string>F529L4WT3V</string>
<key>uploadSymbols</key>
<true/>
<key>destination</key>
<string>upload</string>
</dict>
</plist>
cp <APP_DIR>/.env.backup <APP_DIR>/.env
上传完成后,处理需要 5~15 分钟。
可以使用 Claude in Chrome 扩展操作 App Store Connect。
1. 使用 tabs_context_mcp 确认连接
2. 导航到 appstoreconnect.apple.com
3. 让用户登录(禁止输入密码)
4. 登录后,从应用列表通过截图确认状态
注意:
tabs_context_mcp 重新连接出口合规:
ITSAppUsesNonExemptEncryption: false,则会自动回答⚠ 构建前清除调试残留:
apiClient.ts 等处的调试 console.log → 删除.env 为生产值 → 确认常见错误:
| 错误 | 处理方式 |
|---|---|
| “请选择构建” | 构建未保存。再次添加→保存 |
| “此版本最新信息为必填项” | 填写 What's New |
| “需要屏幕截图” | 新版本首次保存后会继承屏幕截图 |
| “版本 X 的 train 已关闭” | 提升 version(0.8.3 → 0.8.4) |
TestFlight 中看不到 console.log。 问题排查必须依赖 UI 上的调试显示。
在 TestFlight 构建中测试新功能或 API 集成时,务必在 Settings 界面设置 Diagnose 按钮:
// 添加到 Settings 界面
const handleDiagnose = async () => {
const lines: string[] = [];
// 1. 认证状态
lines.push(`Clerk isSignedIn: ${clerkIsSignedIn}`);
lines.push(`Clerk userId: ${clerkUserId ?? 'null'}`);
// 2. 令牌获取测试
try {
const token = await getToken();
lines.push(`Token: ${token ? `OK (len=${token.length})` : 'NULL'}`);
} catch (err: any) {
lines.push(`Token ERROR: ${err.message}`);
}
// 3. API 连通性测试(直接使用 fetch 确认原始响应)
try {
const resp = await fetch(`${BASE_URL}/api/target-endpoint`, { headers });
const raw = await resp.json();
// 确认是否有 apiSuccess 包装
lines.push(`API: ${resp.status}`);
lines.push(`Has data wrapper: ${'data' in raw}`);
lines.push(`Response keys: ${Object.keys(raw).join(', ')}`);
} catch (err: any) {
lines.push(`API ERROR: ${err.message}`);
}
Alert.alert('Diagnose', lines.join('\n'));
};
确认要点:
NULL → Clerk 会话问题undefined → 响应包装器(apiSuccess)解包遗漏Has data wrapper: true → 需要在 apiClient.handleResponse 中解包发布(提交审核)前务必:
apiClient.ts 等处的 console.log('[API] Token obtained...') 等调试日志grep -r "return null" <APP_DIR>/src/providers/ 2>/dev/null
NG: if (!isLoaded) return null; OK: 返回加载 UI
grep -A5 "expo-tracking-transparency" <APP_DIR>/app.json
裸字符串 "expo-tracking-transparency" 是 NG。必须使用对象形式。
# 确认 modules/*/ios/ 是否被排除
# 应为 /ios/(仅限根目录)而非 ios/
grep "^ios/" <APP_DIR>/.gitignore
grep "^/ios/" <APP_DIR>/.gitignore
ios/ → 排除所有层级的 ios/(也会删除原生模块的 Swift 源代码) /ios/ → 仅排除根目录的 ios/(正确)
cd muednote-mobile
npm install && npx expo prebuild --clean
xcodebuild -workspace ios/MUEDnote.xcworkspace -scheme MUEDnote \
-configuration Release -archivePath build/MUEDnote.xcarchive \
-destination "generic/platform=iOS" DEVELOPMENT_TEAM=F529L4WT3V \
CODE_SIGN_STYLE=Automatic -allowProvisioningUpdates archive
xcodebuild -exportArchive -archivePath build/MUEDnote.xcarchive \
-exportPath build -exportOptionsPlist ExportOptions.plist -allowProvisioningUpdates
com.mued.notecd muedear
npm install && npx expo prebuild --clean
xcodebuild -workspace ios/MUEDear.xcworkspace -scheme MUEDear \
-configuration Release -archivePath build/MUEDear.xcarchive \
-destination "generic/platform=iOS" DEVELOPMENT_TEAM=F529L4WT3V \
CODE_SIGN_STYLE=Automatic -allowProvisioningUpdates archive
xcodebuild -exportArchive -archivePath build/MUEDear.xcarchive \
-exportPath build -exportOptionsPlist ExportOptions.plist -allowProvisioningUpdates
com.mued.muedear.gitignore 中的 ios/ 排除了 modules/*/ios/ 的 Swift 源代码而导致的事故案例pk_test 残留,进行生产构建会导致事故Provider 返回了 null。修改为返回加载 UI。
expo-tracking-transparency 的插件配置是裸字符串。改为对象形式。
屏幕截图与实际应用不符。更新为最新版本。
演示账户信息与应用表单不符。如果占位符是“メールアドレス”,则用邮件格式填写。
We have addressed the issue identified in the previous review:
**[Issue] (fixed)**
- Root cause: [Technical explanation]
- Fix: [What was changed]
- File changed: [File path]
Build [N] contains this fix. Thank you for your review.
Weekly Installs
67
Repository
First Seen
Feb 9, 2026
Security Audits
Installed on
claude-code61
gemini-cli34
codex34
opencode33
github-copilot33
amp32
ローカルビルド → App Store Connect アップロード → TestFlight / 審査提出の完全ワークフロー。
# どのアプリをビルドするか確認
ls -d */app.json
# → muednote-mobile/app.json, muedear/app.json
| 目的 | ブランチ |
|---|---|
| App Store 審査提出 | main |
| TestFlight テスト | feature ブランチ OK |
git branch --show-current
git status
# app.json から現在の version と buildNumber を確認
cat <APP_DIR>/app.json | grep -E '"version"|"buildNumber"'
ルール:
version: App Store に表示されるバージョン(例: 0.8.4)buildNumber: 同一 version 内で一意。常に既存の最大値 + 1 にする重要: .env の値は prebuild 時ではなく、xcodebuild archive 時に Metro bundler が注入する。
# 現在の .env を確認
cat <APP_DIR>/.env
# バックアップ(初回のみ)
cp <APP_DIR>/.env <APP_DIR>/.env.backup
| 用途 | CLERK_KEY | API_URL |
|---|---|---|
| 本番 (App Store) | pk_live_... | https://mued.jp |
| テスト (TestFlight) | pk_test_... | preview deploy URL |
TestFlight ビルドの場合:
# .env を TestFlight 用に変更
# EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
# EXPO_PUBLIC_API_URL=https://<preview-url>.vercel.app
本番ビルドの場合:
# .env が本番値であることを確認
# EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_...
# EXPO_PUBLIC_API_URL=https://mued.jp
ビルド後は必ず本番値に戻す:
cp <APP_DIR>/.env.backup <APP_DIR>/.env
cd <APP_DIR>
npm install
npx expo prebuild --clean
--clean は ios/ を削除して再生成する。常につける。
xcodebuild -workspace ios/<SCHEME>.xcworkspace \
-scheme <SCHEME> \
-configuration Release \
-archivePath build/<SCHEME>.xcarchive \
-destination "generic/platform=iOS" \
DEVELOPMENT_TEAM=F529L4WT3V \
CODE_SIGN_STYLE=Automatic \
-allowProvisioningUpdates \
archive
アプリ別の値:
| アプリ | SCHEME | workspace |
|---|---|---|
| MUEDnote | MUEDnote | ios/MUEDnote.xcworkspace |
| MUEDear | MUEDear | ios/MUEDear.xcworkspace |
xcodebuild -exportArchive \
-archivePath build/<SCHEME>.xcarchive \
-exportPath build \
-exportOptionsPlist ExportOptions.plist \
-allowProvisioningUpdates
-allowProvisioningUpdates がないと "No profiles found" エラーになる。
各アプリディレクトリに配置済み。なければ作成:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>app-store-connect</string>
<key>signingStyle</key>
<string>automatic</string>
<key>teamID</key>
<string>F529L4WT3V</string>
<key>uploadSymbols</key>
<true/>
<key>destination</key>
<string>upload</string>
</dict>
</plist>
cp <APP_DIR>/.env.backup <APP_DIR>/.env
アップロード完了後、5〜15分で処理完了。
Claude in Chrome 拡張で App Store Connect を操作できる。
1. tabs_context_mcp で接続確認
2. appstoreconnect.apple.com に navigate
3. ユーザーにログインしてもらう(パスワード入力は禁止)
4. ログイン後、アプリ一覧からスクリーンショットで状態確認
注意:
tabs_context_mcp で再接続輸出コンプライアンス:
ITSAppUsesNonExemptEncryption: false が app.json に設定済みなら自動回答⚠ ビルド前にデバッグ残骸を除去:
apiClient.ts 等のデバッグ console.log → 削除.env が本番値であること → 確認よくあるエラー:
| エラー | 対処 |
|---|---|
| 「ビルドを選択してください」 | ビルドが保存されていない。再度追加→保存 |
| 「このバージョンの最新情報は必須」 | What's New を記入 |
| 「スクリーンショットが必要」 | 新バージョンは初回保存後にスクショが引き継がれる |
| 「バージョンXのトレインはクローズ」 | version を上げる(0.8.3 → 0.8.4) |
TestFlight ではconsole.log は見えない。 問題の切り分けにはUI上のデバッグ表示が必須。
TestFlight ビルドで新機能やAPI連携をテストする場合、Settings画面に Diagnose ボタン を必ず設置する:
// Settings画面に追加
const handleDiagnose = async () => {
const lines: string[] = [];
// 1. 認証状態
lines.push(`Clerk isSignedIn: ${clerkIsSignedIn}`);
lines.push(`Clerk userId: ${clerkUserId ?? 'null'}`);
// 2. トークン取得テスト
try {
const token = await getToken();
lines.push(`Token: ${token ? `OK (len=${token.length})` : 'NULL'}`);
} catch (err: any) {
lines.push(`Token ERROR: ${err.message}`);
}
// 3. API疎通テスト(直接 fetch で生レスポンスを確認)
try {
const resp = await fetch(`${BASE_URL}/api/target-endpoint`, { headers });
const raw = await resp.json();
// apiSuccess ラップの有無を確認
lines.push(`API: ${resp.status}`);
lines.push(`Has data wrapper: ${'data' in raw}`);
lines.push(`Response keys: ${Object.keys(raw).join(', ')}`);
} catch (err: any) {
lines.push(`API ERROR: ${err.message}`);
}
Alert.alert('Diagnose', lines.join('\n'));
};
確認ポイント:
NULL → Clerk セッションの問題undefined → レスポンスラッパー(apiSuccess)の unwrap 漏れHas data wrapper: true → apiClient.handleResponse でアンラップが必要リリース(審査提出)前に必ず:
apiClient.ts 等の console.log('[API] Token obtained...') 等のデバッグログを削除grep -r "return null" <APP_DIR>/src/providers/ 2>/dev/null
NG: if (!isLoaded) return null; OK: ローディング UI を返す
grep -A5 "expo-tracking-transparency" <APP_DIR>/app.json
ベア文字列 "expo-tracking-transparency" はNG。オブジェクト形式が必須。
# modules/*/ios/ が除外されていないか確認
# ios/ ではなく /ios/ (ルート限定) であること
grep "^ios/" <APP_DIR>/.gitignore
grep "^/ios/" <APP_DIR>/.gitignore
ios/ → 全階層の ios/ を除外(ネイティブモジュールのSwiftソースも消える) /ios/ → ルートの ios/ のみ除外(正しい)
cd muednote-mobile
npm install && npx expo prebuild --clean
xcodebuild -workspace ios/MUEDnote.xcworkspace -scheme MUEDnote \
-configuration Release -archivePath build/MUEDnote.xcarchive \
-destination "generic/platform=iOS" DEVELOPMENT_TEAM=F529L4WT3V \
CODE_SIGN_STYLE=Automatic -allowProvisioningUpdates archive
xcodebuild -exportArchive -archivePath build/MUEDnote.xcarchive \
-exportPath build -exportOptionsPlist ExportOptions.plist -allowProvisioningUpdates
com.mued.notecd muedear
npm install && npx expo prebuild --clean
xcodebuild -workspace ios/MUEDear.xcworkspace -scheme MUEDear \
-configuration Release -archivePath build/MUEDear.xcarchive \
-destination "generic/platform=iOS" DEVELOPMENT_TEAM=F529L4WT3V \
CODE_SIGN_STYLE=Automatic -allowProvisioningUpdates archive
xcodebuild -exportArchive -archivePath build/MUEDear.xcarchive \
-exportPath build -exportOptionsPlist ExportOptions.plist -allowProvisioningUpdates
com.mued.muedear.gitignore の ios/ が modules/*/ios/ の Swift ソースまで除外していた事故例ありpk_test のまま本番ビルドすると事故るProvider が null を返している。ローディング UI を返すように修正。
expo-tracking-transparency のプラグイン設定がベア文字列。オブジェクト形式に変更。
スクリーンショットが実際のアプリと一致しない。最新版に更新。
デモアカウント情報がアプリのフォームと一致しない。プレースホルダーが「メールアドレス」ならメール形式で記載。
We have addressed the issue identified in the previous review:
**[Issue] (fixed)**
- Root cause: [Technical explanation]
- Fix: [What was changed]
- File changed: [File path]
Build [N] contains this fix. Thank you for your review.
Weekly Installs
67
Repository
First Seen
Feb 9, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code61
gemini-cli34
codex34
opencode33
github-copilot33
amp32
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
124,500 周安装
Tavily Web技能:智能网络搜索与内容提取API集成指南
293 周安装
Expo移动应用开发指南:React Native应用开发、RevenueCat付费墙、AdMob广告集成
293 周安装
Markdown转PDF工具 - 一键生成苹果设计风格专业白皮书
294 周安装
短视频脚本生成器 - 为YouTube Shorts/Reels创作病毒式个性驱动脚本,避免AI陈词滥调
294 周安装
Vercel React 最佳实践指南:45条性能优化规则,提升Next.js应用性能
297 周安装
Sentry Svelte SDK 安装与配置指南 - 为Svelte/SvelteKit应用集成错误监控与性能追踪
302 周安装