Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đã đóng Phù hợp với người mới
#3,296 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
76/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
ios, typescript
Lĩnh vực
build-system, mobile

Hướng nghiên cứu

Bắt đầu với packages/platform-apple/src/runner/runner-cache-metadata.ts và kiểm tra RUNNER_SANDBOX_BUILD_ARGS, sau đó lần theo cách các đối số này được chuyển đến quá trình build runner. Tái hiện lỗi bằng các thiết lập vị trí build tùy chỉnh của Xcode được cung cấp và agent-device prepare ios-runner --platform ios; hoàn tất khi quá trình build runner tìm thấy .xctestrun tại đường dẫn dữ liệu dẫn xuất dự kiến.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
4.9k
Fork
328
Merge trung bình
12 giờ 13 phút
Pull request đã merge (30 ngày)
541

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của callstack/agent-device

Tất cả issue của callstack/agent-device

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.