Overview
Thetuist xcodebuild command extends Apple’s xcodebuild CLI with server capabilities such as selective testing, build analytics, and insights. It provides the same interface as xcodebuild while adding powerful features from Tuist Cloud.
All standard xcodebuild arguments are passed through, so you can use it as a drop-in replacement.
Usage
Subcommands
tuist xcodebuild test
Runs tests with insights and analytics.
test action.
Example
tuist xcodebuild test-without-building
Runs tests without building first, with insights.
test-without-building action.
Example
tuist xcodebuild build
Builds with insights and analytics.
build action.
Example
tuist xcodebuild build-for-testing
Builds for testing with insights.
build-for-testing action.
Example
tuist xcodebuild archive
Creates an archive with insights.
archive action.
Example
Server capabilities
When connected to Tuist Cloud,tuist xcodebuild provides:
Selective testing
Automatically runs only tests affected by code changes, significantly reducing test execution time. The command:- Hashes your project’s targets and dependencies
- Compares against cached test results on the server
- Runs only tests for changed code
- Uploads new test results for future runs
tuist xcodebuild test.
Build analytics
Collects and uploads build metrics including:- Build duration and status
- Compilation times per target
- Error and warning counts
- Device and configuration information
- Test results and coverage
Insights
Provides intelligent insights into your builds:- Performance bottlenecks
- Flaky test detection
- Build time trends
- Error patterns
Drop-in replacement
Replacexcodebuild with tuist xcodebuild in your existing scripts and CI workflows:
Before:
CI integration
Usetuist xcodebuild in your CI pipelines to get insights and selective testing:
GitHub Actions
GitLab CI
Jenkins
Authentication
To use server capabilities, authenticate with Tuist Cloud:TUIST_CONFIG_TOKEN environment variable in CI.
Examples
Basic test run
Test with specific device
Build for multiple destinations
Archive for distribution
Test with parallel execution
Limitations
- Selective testing: Currently only works for unit tests (not UI tests)
- Analytics: Requires authentication with Tuist Cloud
- Network: Requires internet connection to upload analytics