Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

iOS runner build ignores `-derivedDataPath` when Xcode uses a custom build location

已关闭 适合新手
#3,296 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
ios, typescript

调研方向

从 packages/platform-apple/src/runner/runner-cache-metadata.ts 开始,检查 RUNNER_SANDBOX_BUILD_ARGS,然后追踪这些参数如何传递到 runner 构建中。使用提供的 Xcode 自定义构建位置设置和 agent-device prepare ios-runner --platform ios 重现问题;当 runner 构建在预期的派生数据路径下找到其 .xctestrun 时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Version: agent-device 0.21.19, Xcode 27 beta, macOS

What happens

When Xcode's global preference sets a custom build location, prepare ios-runner (and the first open on iOS) fails:

Failed to locate .xctestrun after build

Xcode writes the runner products relative to the runner project (dist/apple/runner/AgentDeviceRunner/Build/...) instead of the derived data path that agent-device passes. Parallel attempts can also fail with database is locked.

How to reproduce

defaults write com.apple.dt.Xcode IDEBuildLocationStyle Custom
defaults write com.apple.dt.Xcode IDECustomBuildLocationType RelativeToWorkspace
defaults write com.apple.dt.Xcode IDECustomBuildProductsPath Build/Products
agent-device prepare ios-runner --platform ios

Cause

IDEBuildLocationStyle=Custom takes precedence over -derivedDataPath for build products. Teams use this setting so that Xcode and command-line tools share one products folder.

Suggested fix

Add -IDEBuildLocationStyle=Unique to the runner build arguments, for example in RUNNER_SANDBOX_BUILD_ARGS (packages/platform-apple/src/runner/runner-cache-metadata.ts). With this argument the runner builds into the agent-device derived data path again. We verified the change locally by patching dist/src/runner-cache-metadata.js: prepare ios-runner then succeeds.

An alternative is an environment variable for extra xcodebuild arguments.

主要语言
TypeScript
星标
4.9k
派生
328
平均合并
12 小时 13 分钟
30 天内合并 PR
541

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

callstack/agent-device 的其他 Issue

查看 callstack/agent-device 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。