Sebastián Castro
Sebastián Castro

Reputation: 1408

Xcode 4.4.1 and Xcode 4.5 side by side

Anyone have this two versions of Xcode side by side on same machine?

I have Xcode 4.4.1 installed and I want to update to latest version (4.5) so I can use iOS 6 SDK, but I need to keep 4.4.1 for some clients.

Can I make a simple copy of this version and keep installed after upgrade? Because I know some people tried to make this and failed.

Upvotes: 6

Views: 2695

Answers (3)

matt
matt

Reputation: 535119

The reason some people failed is that when they downloaded Xcode 4.5 from the Mac App Store it overwrote their existing Xcode 4.4.1. The Mac App Store will do this if it sees an existing version of Xcode anywhere. There are two possible solutions:

  • Don't use the Mac App Store. It is always possible to obtain any version of Xcode as an ordinary download from the Apple Developer site.

  • Use the Mac App Store, but before you do, zip your existing copy of Xcode. That way, the zipped copy will be kept through the download process. Later, you can unzip it.

Note that two different versions of Xcode cannot exist in the same folder (e.g. top-level Applications) because they have the same name. The easily solution is to put one of them in a subfolder.

Upvotes: 1

Steven Fisher
Steven Fisher

Reputation: 44876

  1. Complete a Time Machine backup.
  2. Upgrade Xcode to 4.5.
  3. Restore Xcode 4.4 from the Time Machine backup. (You may have to go back a few hours, depending on how long Xcode 4.5 took to download. Check the file size.) Keep Both.
  4. Rename Xcode (Original) to Xcode 4.4.1.

Once you've done this, just run the appropriate version of Xcode. Xcode 4.5 will update some system components, but these updates won't prevent Xcode 4.4.1 from running.

If you use the command line tools, you should use xcode-select to switch between versions or the environment variable DEVELOPER_DIR to pin to a specific version.

Upvotes: 6

DrummerB
DrummerB

Reputation: 40211

Since Xcode is available on the App Store it's just a regular app. It doesn't install anything under /Developer that could be overridden if you install a new version. All the required files are inside the app bundle (except preferences, docs - those will be shared by multiple Xcode versions)

If you want to be sure, I recommend the following. Backup the old version (to an external hard disk), install the new version and restore the old version with a different name.

Upvotes: 2

Related Questions