iOS应用商店评论插件
 ](https://www.npmjs.com/package/ios-app-review-plugin) 
在提交之前发现App Store拒绝问题。作为一个 CLI工具 和一个 克劳德代码MCP服务器.
它的作用
分析您的Xcode项目和App Store Connect元数据,以标记导致App Store拒绝的问题:
- 信息列表 --缺少密钥、无效的隐私描述、部署目标问题
- 隐私清单 -iOS 17+必需原因API声明
- 权益 --配置错误的功能,仅调试版本中的权限
- 代码扫描仪 --硬编码的秘密、调试语句、强制解包、弃用的API
- 弃用的API --UIWebView、AddressBook和50多种其他已弃用的符号
- 私有API --检测导致拒绝的未记录的Apple API
- 安全 --ATS异常、不安全存储、弱加密、越狱检测
- UI/UX合规性 --启动故事板、定向、可访问性、暗模式
- 应用商店连接 --元数据完整性、屏幕截图、版本状态、IAP配置
- 自定义规则 --使用正则表达式模式定义特定于项目的检查
快速开始
命令行界面
npm install -g ios-app-review-plugin
# Scan a project
ios-app-review scan ./MyApp.xcodeproj
# JSON output to file
ios-app-review scan ./MyApp.xcodeproj --format json --output report.json
# Specific analyzers only
ios-app-review scan ./MyApp.xcodeproj --analyzers code,security,privacy
# Incremental scan (only changed files)
ios-app-review scan ./MyApp.xcodeproj --changed-since main
# With badge generation
ios-app-review scan ./MyApp.xcodeproj --badge --output report.mdMCP服务器(克劳德代码)
增添 ~/.claude/mcp_servers.json:
{
"ios-app-review": {
"command": "node",
"args": ["/path/to/ios-app-review-plugin/dist/index.js"],
"env": {
"ASC_KEY_ID": "your-key-id",
"ASC_ISSUER_ID": "your-issuer-id",
"ASC_PRIVATE_KEY_PATH": "/path/to/AuthKey.p8"
}
}
}然后在克劳德代码中:
Review my iOS app at ./MyApp.xcodeproj before submissionCLI参考
USAGE
ios-app-review [options]
COMMANDS
scan
Analyze an Xcode project
help Show usage information
version Print version
SCAN OPTIONS
-f, --format Output format: markdown, html, json (default: markdown)
-o, --output
Write report to file (default: stdout)
-a, --analyzers
Comma-separated analyzer names
--include-asc Include App Store Connect validation
--changed-since Only scan files changed since git ref
-c, --config
Path to custom rules file
--badge Generate SVG badge alongside report
--save-history Save results for historical comparison
EXIT CODES
0 All checks passed
1 Issues with errors found
2 Invalid arguments or runtime error分析器
| 名称 | 密钥 | 描述 |
|---|---|---|
| 信息列表 | info-plist | 所需密钥、隐私说明、捆绑配置 |
| 隐私清单 | privacy | iOS 17+必需原因API声明 |
| 权利 | entitlements | 能力配置、调试权限 |
| 代码扫描器 | code | 秘密、调试代码、强制解包、TODO |
| 已弃用的API | deprecated-api | UIWebView、地址簿和50多种已弃用的符号 |
| 私人API | private-api | 未记录的Apple API使用情况 |
| 安全 | security | ATS、加密、存储、越狱检测 |
| UI/UX | ui-ux | 启动屏幕、方向、可访问性 |
| ASC元数据 | asc-metadata | 应用程序名称、描述、截图、隐私政策 |
| ASC屏幕截图 | asc-screenshots | 每个设备的屏幕截图数量和尺寸 |
| ASC版本 | asc-version | 版本状态、构建附件、版权 |
| ASC-IAP | asc-iap | 应用内购买本地化、定价 |
自定义规则
创建 .ios-review-rules.json 在项目根目录中:
{
"version": 1,
"rules": [
{
"id": "no-force-unwrap",
"title": "Avoid force unwrapping",
"description": "Force unwrapping can cause crashes",
"severity": "warning",
"pattern": "\\w+!\\.",
"fileTypes": [".swift"],
"category": "code"
}
]
}看 自定义规则指南 获取完整文档。
CI/CD集成
GitHub操作
- uses: ./.github/actions/ios-review
with:
project-path: ./MyApp.xcodeproj
format: json看 CI/CD指南 有关详细的设置说明。
App Store连接设置
- 首选 应用商店连接 >用户和访问>集成>密钥
- 生成具有“应用程序管理器”角色的API密钥
- 下载
.p8文件 - 设置环境变量:
ASC_KEY_ID,ASC_ISSUER_ID,ASC_PRIVATE_KEY_PATH
看 ASC设置教程.
项目结构
src/
index.ts Dual-mode entry point (CLI + MCP server)
analyzer.ts Parallel analysis orchestrator
cli/ CLI commands (scan, help, version)
analyzers/ 12 analyzer implementations
asc/ App Store Connect API client
parsers/ Xcode project + plist parsers
reports/ Markdown, HTML, JSON formatters
guidelines/ App Store Guidelines cross-reference
rules/ Custom rule engine
history/ Scan history + comparison
cache/ File-level caching
git/ Git diff for incremental scanning
progress/ Progress reporting
badge/ SVG badge generation文档
发展
npm install
npm run build
npm test
npm run benchmark许可证
MIT许可证-请参阅 许可证 了解详情。
