bazelbuild / bazelbuild/rules_apple
`macos_unit_test` fails with default sandboxing
- Dominant language
- Starlark
- Stars
- 593
- Forks
- 334
- Avg merge
- 16h 48m
- Merged PRs (30d)
- 9
Description
Trying to run one of the sample `macos_unit_test` targets, [`//examples/multi_platform/Buttons:ButtonsMacTests`](https://github.com/bazelbuild/rules_apple/blob/2d5d3499b40a2583c0b22ade02ea8059a5ab18f2/examples/multi_platform/Buttons/BUILD#L394), gives an error (test.log and test.xcresult are attached).
## Versions
Bazel version: 9.2.0
Xcode version: 26.5
rules_apple commit: 2d5d3499b40a2583c0b22ade02ea8059a5ab18f2
[test.xcresult.zip](https://github.com/user-attachments/files/30319290/test.xcresult.zip)
[test.log](https://github.com/user-attachments/files/30319289/test.log)
## Errors
```
2026-07-23 19:00:59.268 xcodebuild[33230:6362940] [MT] IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
```
Followed by:
```
2026-07-23 19:00:59.883 xcodebuild[33230:6362972] IDETestOperationsObserverDebug: Failure collecting logarchive: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service named com.apple.testmanagerd.control was invalidated: Connection init failed at lookup with error 3 - No such process." UserInfo={NSDebugDescription=The connection to service named com.apple.testmanagerd.control was invalidated: Connection init failed at lookup with error 3 - No such process.}
```
Contributor guide
Research direction
Reproduce //examples/multi_platform/Buttons:ButtonsMacTests from examples/multi_platform/Buttons/BUILD at the referenced target, using the attached test.log and test.xcresult to inspect the default-sandboxing failure. Trace how the macos_unit_test target is built and run, then verify that this sample target completes successfully with default sandboxing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100