xcpretty / xcode-install

🔽 Install and update your Xcodes
https://fastlane.tools
MIT License
2.59k stars 243 forks source link

Fix xcversion fails to install a new Xcode beta to the same location #302

Closed thii closed 6 years ago

thii commented 6 years ago

Currently all Xcode betas are installed under the name Xcode-beta.app. If you have Xcode 10 beta 5 installed, and you install Xcode 10 beta 6, the installation will fail when it copies the new app to the same location. The downloaded .xip file also gets deleted even the installation fails, so you end up having to download it again (after deleting or renaming /Applications/Xcode-beta.app).

This patch follows the following naming for betas:

xcversion install 10 beta 6 installs to /Applications/Xcode-10.beta.6.app

The installation location remains unchanged for non-beta versions.

Since it won't overwrite the old version, you can go back to previous beta if the new beta goes wrong with your project (e.g. Crashlytics, Fabric, GoogleAnalytics don't compile with Xcode 10 beta 5 while they do with Xcode 10 beta 4) and Apple doesn't keep old betas on Developer Center.