0

After a fresh install of Lion and Xcode 4.1 from the Mac App Store, I would like to install another version of Xcode alongside.

I heard that this perfectly safe to install it in another directory (considering the first to be on /Developer). The only thing to remember is that running xcodebuild would result in launching the last one installed.

But I have another issue while installing it, even f I changed the directory it clearly says that it will upgrade Xcode Toolset, System Tools and UNIX Development and that they can only be located is /Developer and for one installation per system, here is a screenshot :

Screenshot of the upgrade status

So how to have another clean instance of Xcode and SDKs without screwing up the production one ?

Thanks a lot.

Mustapha-Tarek
  • 111
  • 1
  • 9

2 Answers2

2

It doesn't seem to be possible to install the System Tools on both versions. I've never had success with that.

One thing to note, if you install an older version of xCode side-by-side with the latest version, the "Build Archive" function in the Organizer will not function. The only remedy I found was to remove both xCodes and reinstall the one I wanted to use for building the archive. It was a painful process.

retrodrone
  • 5,850
  • 9
  • 39
  • 65
  • So indeed it seems that multiple installations are not so safe, that's a pity... Thanks. – Mustapha-Tarek Jul 21 '11 at 14:53
  • Indeed. On my large-scale project, we ended up testing on various versions of iOS on real devices. We saw numerous differences between the simulator and the devices which was frustrating. I spent hours running test procedures with a different iPod touch in each hand. Fun! – retrodrone Jul 21 '11 at 15:02
1

Actually you can do this (or at least I seem to be able to). At times I have had three separate instances of XCode installed - an older XCode 3.x (which I've subsequently gotten rid of), an XCode 4 production, an XCode 5 beta; all in separate directories.

The key thing for me was calling the command line tool to tell which system is the "primary" xcode for the purposes of running xcodebuild, instruments, agvtool and a bunch of others: xcode-select -switch /Developer (just man xcode-select ftw).

So, I have a 4.0.2 build as primary now, and keep upgrading the iOS5 betas. I try them out, but when I want to cut a production build using 4.0.2, I ensure that my system knows that /Developer is current, switching it if I need to. FWIW, there is risk that the single-set-of-System-tools could be broken when you replace them with the latest set, but that's (so far) never hit me.

Also, for reference there is another discussion along similar lines here: Install xCode 3.2.3 w/ iPhone SDK 4, get "Base SDK missing", can't see other SDKs

Community
  • 1
  • 1
Scott Corscadden
  • 2,831
  • 1
  • 25
  • 43