Xcode installers and installations
Xcode installers and installations
Section titled “Xcode installers and installations”Installer discovery
Section titled “Installer discovery”Search Spotlight plus bounded common locations for:
Xcode*.xipXcode*.dmgXcode*.zip
Do not recursively crawl an entire home directory. Report mounted disk images and detach them before an approved move to Trash.
An installer is a strong candidate only when:
- Its filename or verified metadata identifies an Xcode version.
- An installed application has the same version.
- The user accepts losing offline reinstall access.
Filename parsing is evidence, not proof. Unknown or beta naming stays report-only.
Installed Xcodes
Section titled “Installed Xcodes”Inventory applications and versions with:
mdfind 'kMDItemCFBundleIdentifier == "com.apple.dt.Xcode"'xcode-select --print-pathenv DEVELOPER_DIR="/path/to/Xcode.app" xcodebuild -versionenv DEVELOPER_DIR="/path/to/Xcode.app" xcodebuild -showsdksmdls -name kMDItemLastUsedDate "/path/to/Xcode.app"Evidence priority:
- Running processes and the active
xcode-selectpath - Current
DEVELOPER_DIR .xcode-version, CI, scripts, and project requirements- SDKs/toolchains uniquely supplied by the installation
- Spotlight last-used metadata
- Filesystem modification date
Spotlight last-used metadata records LaunchServices opens and can miss command-line or CI usage. Modification time usually reflects installation or updates, not use.
Suggestion threshold
Section titled “Suggestion threshold”Suggest—not select—an older Xcode only when:
- It is not active or running
- A newer installation in the same stable/beta channel exists
- No unique SDK/toolchain requirement is found
- No recent project or automation reference is found
- The evidence and uncertainty are shown to the user
Never assume a stable Xcode replaces a beta or that a beta replaces a stable release. Xcode application removal always requires separate explicit approval.
Apple reference: