When to Use
User needs to manage iOS/macOS apps on App Store Connect. Agent handles API authentication, build management, TestFlight distribution, App Review submissions, and analytics retrieval.
Quick Reference
| Topic | File |
|---|
| API Authentication | INLINECODE0 |
| Common Workflows |
workflows.md |
Core Rules
1. JWT Authentication Required
App Store Connect API uses JWT tokens signed with your private key.
CODEBLOCK0
Generate JWT with ES256 algorithm, 20-minute expiration max. See api-auth.md for code examples.
2. API Versioning
Always specify API version in requests.
CODEBLOCK1
Current stable version: v1. Check Apple docs for v2 endpoints.
3. Build Processing States
Builds go through states after upload:
| State | Meaning | Action |
|---|
| PROCESSING | Upload received, processing | Wait |
| FAILED |
Processing failed | Check logs |
| INVALID | Validation failed | Fix issues, re-upload |
| VALID | Ready for testing/submission | Proceed |
Never submit a build that is not VALID.
4. TestFlight Distribution
- - Internal Testing: Up to 100 members, builds available immediately after processing
- External Testing: Up to 10,000 testers, requires Beta App Review for first build of version
- External groups need at least: app description, feedback email, privacy policy URL
5. App Review Submission
Before submitting for review:
- - All required metadata complete (descriptions, keywords, screenshots)
- App Preview videos under 30 seconds
- Privacy policy URL valid and accessible
- Contact information current
Submission creates an appStoreVersion in PENDING_DEVELOPER_RELEASE or WAITING_FOR_REVIEW.
6. Rate Limits
API has rate limits per hour. Handle 429 responses with exponential backoff.
CODEBLOCK2
7. Bundle ID Management
Bundle IDs are permanent once created. Cannot be deleted or renamed.
- - Use reverse-domain notation: INLINECODE8
- Plan naming carefully before registration
- Each bundle ID can only belong to one team
Common Traps
- - Expired JWT - Tokens expire in 20 min max. Regenerate before long operations.
- Wrong key permissions - API keys need specific roles (Admin, App Manager, etc.)
- Missing export compliance - Apps with encryption need ECCN or exemption documentation
- Build version collision - Each build needs unique version+build number combo
- Screenshot dimensions - Must match exactly for each device type (no scaling)
- Phased release confusion - Phased release is for App Store only, not TestFlight
External Endpoints
| Endpoint | Data Sent | Purpose |
|---|
| api.appstoreconnect.apple.com | App metadata, build info | App Store Connect API |
No other data is sent externally.
Security & Privacy
Data that leaves your machine:
- - App metadata sent to Apple for App Store listing
- Build information for processing
- Analytics queries
Data that stays local:
- - API private key (.p8) - never transmit
- JWT tokens - generated locally
- Downloaded reports
This skill does NOT:
- - Store your .p8 key in plain text
- Share credentials with third parties
- Access apps outside your team
Related Skills
Install with
clawhub install <slug> if user confirms:
- -
ios — iOS development patterns - INLINECODE11 — Swift language reference
- INLINECODE12 — Xcode IDE workflows
Feedback
- - If useful: INLINECODE13
- Stay updated: INLINECODE14
何时使用
用户需要在App Store Connect上管理iOS/macOS应用。智能体负责处理API认证、构建管理、TestFlight分发、App Review提交以及分析数据检索。
快速参考
| 主题 | 文件 |
|---|
| API认证 | api-auth.md |
| 常见工作流 |
workflows.md |
核心规则
1. 需要JWT认证
App Store Connect API使用通过私钥签名的JWT令牌。
bash
所需环境变量:
ASCISSUERID - 来自 App Store Connect > 用户 > 密钥
ASCKEYID - 来自您创建的API密钥
ASCPRIVATEKEY_PATH - .p8私钥文件的路径
使用ES256算法生成JWT,最长20分钟过期。代码示例见api-auth.md。
2. API版本管理
始终在请求中指定API版本。
bash
curl -H Authorization: Bearer $JWT \
https://api.appstoreconnect.apple.com/v1/apps
当前稳定版本:v1。v2端点请查阅Apple文档。
3. 构建处理状态
上传后构建会经历以下状态:
| 状态 | 含义 | 操作 |
|---|
| PROCESSING | 已收到上传,正在处理 | 等待 |
| FAILED |
处理失败 | 检查日志 |
| INVALID | 验证失败 | 修复问题,重新上传 |
| VALID | 可进行测试/提交 | 继续操作 |
切勿提交非VALID状态的构建。
4. TestFlight分发
- - 内部测试:最多100名成员,处理完成后即可使用构建
- 外部测试:最多10,000名测试员,版本首次构建需通过Beta App Review
- 外部群组至少需要:应用描述、反馈邮箱、隐私政策URL
5. App Review提交
提交审核前需确保:
- - 所有必需元数据完整(描述、关键词、截图)
- App预览视频不超过30秒
- 隐私政策URL有效可访问
- 联系信息为最新
提交后创建appStoreVersion,状态为PENDINGDEVELOPERRELEASE或WAITINGFORREVIEW。
6. 速率限制
API有每小时速率限制。对429响应采用指数退避策略处理。
bash
遵循Retry-After头信息
HTTP/1.1 429 Too Many Requests
Retry-After: 60
7. Bundle ID管理
Bundle ID一旦创建即为永久性。无法删除或重命名。
- - 使用反向域名表示法:com.company.appname
- 注册前仔细规划命名
- 每个Bundle ID只能属于一个团队
常见陷阱
- - JWT过期 - 令牌最长20分钟过期。长时间操作前需重新生成。
- 密钥权限错误 - API密钥需要特定角色(管理员、应用管理者等)
- 缺少出口合规 - 含加密功能的应用需要ECCN或豁免文件
- 构建版本冲突 - 每个构建需要唯一的版本号+构建号组合
- 截图尺寸问题 - 每种设备类型必须精确匹配(不可缩放)
- 分阶段发布混淆 - 分阶段发布仅适用于App Store,不适用于TestFlight
外部端点
| 端点 | 发送数据 | 用途 |
|---|
| api.appstoreconnect.apple.com | 应用元数据、构建信息 | App Store Connect API |
不向外部发送其他数据。
安全与隐私
离开您设备的数据:
- - 发送至Apple用于App Store上架的应用元数据
- 用于处理的构建信息
- 分析查询数据
保留在本地的数据:
- - API私钥(.p8) - 绝不传输
- JWT令牌 - 本地生成
- 下载的报告
此技能不会:
- - 以明文存储您的.p8密钥
- 与第三方共享凭证
- 访问团队外的应用
相关技能
用户确认后使用clawhub install
安装:
- - ios — iOS开发模式
- swift — Swift语言参考
- xcode — Xcode IDE工作流
反馈
- - 如有帮助:clawhub star app-store-connect
- 保持更新:clawhub sync