So I have previously been doing iPhone Development with Xcode 3.2.6 and it was time to try out Xcode 4.0.2. Well it was actually MonoTouch development, but that is not important for this post. Anyways I still need to keep the older version of Xcode around.
So I did some research on installing Xcode 3.2.6 “side-by-side” with Xcode 4.0.2. I came across a few different solutions, like install 4, then go back and reinstall 3, etc. I wanted to keep it as simple as possible, the suggestions I liked the most said to just rename your “Developer” folder to something else, and then install the new version of Xcode which will then default to and create a new “Developer” folder.
Sure enough, easy I told myself, I will just go into Finder and rename the folder. Well as I found out, this wasn’t such an easy task. My first issue on the iMac, I think everything can be done by Right-Clicking my mouse. Do I come from a Windows background or what?
Anyways as I found out, the “usual” way to rename a folder on your Mac is to Click on the File or Folder and then press the “return” key (Enter for those Windows users out there).
Except I soon found out, this wasn’t working with the “Developer” folder.
So how do you rename this folder, you use Terminal. This is like the “Command Prompt” of Windows on your Mac. Luckily I know enough basic Unix commands to get me around. You will find “Terminal” in Applications|Utilities or type “Terminal” in your Spotlight Search (Click on Top Right Magnifying Glass)
Once in Terminal, type the following command
sudo mv /Developer /Developer3.2.6
- mv – unix command for Move (There is no rename command)
- /Developer – Rename which folder
- /Developer3.2.6 – Rename to what? Name this whatever you want your new name to be
- sudo – this one got me, I originally tried without this command on the front and kept getting a permissions issue. This command sudo is for substituting users. I look at it as asking for elevated privileges. You will also be prompted for your Password. I assume (but haven’t verified) you have to be an administrator. But then again what developers aren’t
Once you rename that folder you can resume with installing the new version of XCode.