xcodes
Reference page for the xcodes resource
The xcodes resource installs the xcodes CLI tool and manages multiple Xcode versions on macOS. xcodes is the recommended way for iOS/macOS teams to ensure all developers are running the same Xcode version.
Installing Xcode versions requires an Apple Developer account. xcodes will prompt for Apple ID credentials interactively on first use and caches them in the macOS Keychain. For non-interactive environments, supply appleId and appSpecificPassword directly in the resource config.
Parameters
- xcodeVersions: (string[]) List of Xcode versions to install (e.g.
["15.4", "14.3.1"]). Version strings match whatxcodes listshows — stable versions use a dotted number (15.4), beta/RC versions include the label (15 Beta 3). - selected: (string) The active Xcode version to use, equivalent to running
xcodes select. Must be one of the installedxcodeVersions. - appleId: (string, optional) Apple ID email used to authenticate with Apple's servers when downloading Xcode. If omitted, xcodes will prompt interactively.
- appleIdPassword: (string, optional) Apple ID password. Required alongside
appleIdfor non-interactive installs.
Example usage
[
{
"type": "xcodes",
"xcodeVersions": ["15.4"],
"selected": "15.4",
"os": ["macOS"]
}
]Multiple versions side by side:
[
{
"type": "xcodes",
"xcodeVersions": ["14.3.1", "15.4"],
"selected": "15.4",
"os": ["macOS"]
}
]Authentication
xcodes requires Apple ID credentials to download Xcode from Apple's servers. On first install Codify will prompt for your credentials interactively (including two-factor authentication). The credentials are stored in the macOS Keychain for future use.
For CI or fully non-interactive environments, add appleId and appSpecificPassword to the resource config:
[
{
"type": "xcodes",
"xcodeVersions": ["15.4"],
"selected": "15.4",
"appleId": "your@apple.id",
"appleIdPassword": "<Replace me here!>",
"os": ["macOS"]
}
]Note that 2FA will still trigger interactively even with credentials set — xcodes does not support fully headless 2FA bypass.