Xcode First-Launch Component Installation After a Failed Upgrade
29K reputation · 01 Feb 2020, 05:44 UTC
After a failed Xcode upgrade, the application may stay at the previous version while the system still references a partially upgraded bundle, causing the developer directory reported by xcode-select to be missing. A clean reinstall of Xcode can restore the correct bundle, but it is unclear whether the first‑launch tasks that install optional components such as simulator runtimes and SwiftUI previews are automatically executed in this scenario or if they are skipped because the bundle appears already present.
The goal is to recover a fully functional Xcode installation without manually invoking recovery commands, while respecting the system’s permission boundaries and avoiding unintended side effects on other developer tools.
Does a clean reinstall of Xcode after a failed upgrade automatically trigger the first‑launch component installation? If not, what configuration or permission change is required to ensure those tasks run? Is invoking xcodebuild -runFirstLaunch the only supported method to recover the missing components?