Add Swift for Xcode related command line tools instead of Go
-
id: 0000009
Status
-
Superseded by ADR-0000016 (2026-09-20) by: @clsource
History
-
Superseded by ADR-0000011 (2026-08-17) by: @clsource
-
Accepted (2026-08-16) by: @clsource
Context and Problem Statement
Some helper tools must inspect or modify Xcode projects, such as reading the
project structure, updating asset catalogs, or driving xcodebuild. While
ADR-0000008 chose Go for cross platform tools, Go cannot reuse the iOS codebase
and must reimplement Xcode-specific formats. Which language should be used for
Xcode related command line tools?
Considered Options
-
Use Swift
-
Use Go (per ADR-0000008)
-
Use Bash scripts
Decision Outcome
Chosen option: "Use Swift", because it shares the language and tooling of the iOS app, reads and writes Xcode project formats naturally, and compiles to a native macOS binary with the already installed Xcode toolchain. Positive consequences: Xcode-specific logic can be prototyped or shared with app code, and no extra toolchain is needed on macOS. Negative consequences: the resulting tools are macOS-only unless the cross platform Swift toolchain is also installed.
Swift is the best option for Xcode related tooling, because it is the native
language of Apple platforms and integrates directly with Xcode and
xcodebuild. If Go was chosen, Xcode project formats would need to be
reimplemented. If Bash scripts were used, the logic would be harder to test and
maintain as it grows.
| Consider using Swift directly only if XcodeGen (ADR-0000011) cannot handle the required project generation task. |