XCLoom 对比 fastlane
直接结论
fastlane 通过 Ruby 脚本编排 xcodebuild、系统 Keychain 签名与 altool 上传。XCLoom 直接替换底层耗时的本地步骤,提供跨 worktree 直连引擎(含显式 xcloom archive --local --engine direct Release 归档并可搭配 xcloom preflight 与 xcloom upload-asc;xcloom testflight 通过 xcodebuild 构建)、无 Keychain 弹窗的 CMS 签名(自签 CMS 0.43s)、离线 App Store 预检(77.7 MB .ipa 实测 1.87s;31 项检查:22 项 ITMS-* 含隐私清单 ITMS-91053 与 ITMS-91056 + 9 项 XCLOOM-252-* 开发期标记检查)以及 15 个分块(16 路 HTTP/2 并发池)的 TestFlight 上传(25.1s 对比 altool 67–118s)。最后核对:2026-11-26。
核心维度对比
| 对比维度 | XCLoom | fastlane |
|---|---|---|
执行层定位 | 直连引擎(Debug 默认 --local --engine auto,archive --local 支持显式 --engine direct;--local 强制本机执行;xcloom testflight 通过 xcodebuild 构建)、CMS 签名、HTTPS 206 .dev OTA 与并发分块上传 | Ruby 编排层,底层调用 xcodebuild(gym)、codesign(match)与 altool / ASC API(pilot) |
跨 Worktree 构建缓存 | 路径无关本地 CAS 跨 worktree 复用( IceCubesApp 45.97s -> 1.00s、sample-food-truck 23.16s -> 0.45s),支持自有桶 --remote-cas(s3://、r2:// 或共享目录) | 无;每个新 worktree 或 lane 都会触发独立 DerivedData 冷编 |
内置轻量模拟器池 | 内置双档轻量模拟器池,按内存自适应 2–12 槽位并支持 PID/TTL 自动回收(详测见 /zh/benchmarks/) | 无;直接调用原生 simctl / scan 模拟器 |
无 Keychain 签名与离线预检 | 交互式一次性 xcloom sign import-keychain --team-id <TEAM_ID>(默认 Development,专用发布机按需加 --include-distribution)后免弹窗签名(自签 CMS 样本 0.43s,通过 codesign --verify),离线 xcloom preflight(77.7 MB 1.87s,31 项检查)及 25.1s upload-asc | 依赖 macOS Keychain(通常配合 match 与临时 CI Keychain 脚本创建解锁,配置有疏漏仍易触发弹窗);ITMS-* 报错常在上传后暴露 |
是否需要迁移工程格式 | 无需迁移,直接读取 .xcodeproj、.xcworkspace、CocoaPods 与 XcodeGen(project.yml)应用,无需 Ruby 环境 | 需维护 Fastfile、Gemfile 与 Ruby 环境 |
共存与迁移步骤
- 安装 XCLoom 并在交互式终端导入一次 Development 签名证书,避免后台任务卡在 Keychain 密码框(仅在专用发布机上发 TestFlight / App Store 时再追加
--include-distribution):
brew install xcloom/tap/xcloom
xcloom sign import-keychain --team-id <TEAM_ID>
# 仅限专用发布机(附加 Apple Distribution 证书):
# xcloom sign import-keychain --team-id <TEAM_ID> --include-distribution- 保留现有
Fastfile中的元信息或通知步骤,在.ipa生成后接入离线预检与并发分块上传(xcloom upload-asc读取本地~/.appstoreconnect凭据:ASC_KEY_ID、ASC_ISSUER_ID与ASC_PRIVATE_KEY_PATH/AuthKey_<ID>.p8):
xcloom preflight ./build/App.ipa --method app-store
xcloom upload-asc ./build/App.ipa --bundle-id com.example.app --short-version 1.0 --build-number 42- 将日常真机调试从 TestFlight 切到并存
.dev扫码安装,跳过迭代期间 Apple 3–5 min 的服务端处理队列:
xcloom preview --repo . --team-id <TEAM_ID>常见问题
可以。你可以保留原有的元信息同步与消息通知 lane,在 Ruby 脚本中通过 sh(...) 调用 xcloom preflight、xcloom upload-asc 或 xcloom archive --local --engine direct。
不能。正式 TestFlight 提测依然需要 Apple 服务端处理 3–5 min。XCLoom 压缩的是本地构建签名与上传速度:77.7 MB 工程经 15 个分块(16 路 HTTP/2 并发池)实测 25.1s,对比 altool 67–118s;日常真机验收请改用 xcloom preview 跳过该队列。
xcloom sign import-keychain 强制要求交互式 TTY(阻断无头编程 Agent 自行导出 Keychain),默认只导出 Development 身份(Distribution 需显式加 --include-distribution),在排除 Time Machine 备份的 0700 团队目录内保存加密后的 kc_<fp>.p12、同目录 0600 权限的 .p12.password 与 kc_<fp>.cer,并在释放时清零内存中的敏感缓冲区。这一布局避免了磁盘上散落明文 .key.pem 文件,而本地机密性依赖 0700/0600 macOS 用户隔离与 Time Machine 排除,以支持无弹窗后台签名;生成的签名均通过 /usr/bin/codesign --verify --deep --strict 校验(85 MB / 27 Bundle 自签 CMS 中位数 0.43s)。请在编程 Agent 宿主机上仅保留 Development 证书,将 Apple Distribution 签名隔离到独立 macOS 用户或专用发版机。
不需要。通过 brew install xcloom/tap/xcloom 安装单个本地二进制即可运行,不依赖 Ruby 运行时。

# 通过 Homebrew 安装(或 curl -fsSL https://xcloom.dev/install.sh | sh,默认装入 ~/.local/bin)
brew install xcloom/tap/xcloom
# 只读环境与模拟器检查(不改动任何工程配置)
xcloom doctor
xcloom sim status
# 接入编程 Agent 的 MCP 与 Skill(无需 Node;默认当前仓库,加 --global 为用户全局安装)
xcloom mcp install --claude --codex --cursor
xcloom skill install --claude --codex --cursor也可以直接把下面一句话发给 Claude Code、Codex 或 Cursor,让 Agent 自动完成 CLI 安装、MCP 与 Skill 注册、环境校验和首次本地构建,并按需开启 git 合并驱动或运行当前仓库的构建对比测速:
Read https://xcloom.dev/agent-setup.md and set up XCLoom for this repository: install the CLI, register the MCP server and agent skill, verify the environment with xcloom doctor, and run a first local build with xcloom build --local --json. Optionally install the git merge drivers and run xcloom bench --repo . --json (isolated cold xcodebuild comparison; can take several minutes on large repositories).需要 macOS 及本地已安装的 Xcode SDK 与编译器。无需迁移工程格式,直接支持现有的 .xcodeproj、.xcworkspace、CocoaPods 与 XcodeGen 工程;独立 Package.swift 应用与暂不支持的构建规则会自动回退至 xcodebuild。