Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set xcode version as default in my mac?

Right now I have Xcode 6.0 (Beta) as a default version of my Xcode, but today I installed Xcode 6 from App Store and so I want to set Xcode 6 as a default version.

How can I set it?

like image 739
user1954352 Avatar asked Sep 18 '14 10:09

user1954352


People also ask

How do I switch between Xcode versions?

Go to https://developer.apple.com/download/more to download the older version of Xcode you need and extract the archive. Just make sure to replace Xcode. app with the version you want to use — perhaps sudo xcode-select -s /Applications/Xcode\ 9. app/ instead.

How do I enable Xcode on my Mac?

To install XcodeOpen the App Store on the Mac that will be your server, and search for Xcode. Download Xcode from the App Store. After your download is complete, launch Xcode in /Applications or Launchpad. If prompted, enter your administrator account credentials in order to configure Xcode.

How do I know if Xcode is installed on my Mac?

We'll use Finder to find out if XCode is installed. In Finder, select the Go pull-down menu, and select Applications. Or just use the short-cut key Command-Shift-A while Finder is active. This should open a new Finder window, showing all the Applications installed on your machine.

How do I install multiple versions of Xcode on Mac?

You can download old versions of Xcode and install them on the side of the latest one. So you can just choose which version you want to launch depending on your situation. Open https://developer.apple.com/download/more/ and login with your developer account. Then write Xcode in the left column's search bar.


4 Answers

You could set the desired Xcode using this in the terminal:

sudo xcode-select -s <path/to/>Xcode.app

also, for more info, click here

like image 147
Alex Avatar answered Oct 10 '22 19:10

Alex


Not directly related, however I assume most of you'd find this useful. Here is a link showing the command line FAQs.

The most 2 useful commands are.

  1. Printing the version of Xcode currently used by my tools

xcode-select --print-path

  1. Select the default Xcode for your command-line tools

sudo xcode-select -switch Xcode.app

E.g: sudo xcode-select -switch /Applications/Xcode5.1.1/Xcode.app

like image 31
Ruchira Randana Avatar answered Oct 10 '22 21:10

Ruchira Randana


It should be easy.

Solution 1:

  • Right click(or Control + Click) on Xcode project file (.xcodeproj).
  • Hover over 'Open with' and you will find all the Xcode apps from Applications directory listed.

Screen Shot of multiple Xcode apps

  • Now, hold down the Option key so that the “Open With” menu becomes “Always Open With”.
  • Continue to hold Option and select the Xcode version you want to set as the default for this file.

Solution 2:

Another way to apply this change to all the similar files is by clicking "Get info" and then making necessary change in 'Open With' section.

enter image description here

like image 50
Ajith R Nayak Avatar answered Oct 10 '22 19:10

Ajith R Nayak


In 10.10 you should use (Assuming you've installed few versions of Xcode as Xcode6.1, Xcode6.2 and Xcode6.3, and want to make Xcode6.3 as default one).

sudo xcode-select --switch /Applications/Xcode6.3.app

This comes handy with some 3rd party applications which fails to reset the path from OSX like SVNX.app

like image 24
Anoop Vaidya Avatar answered Oct 10 '22 20:10

Anoop Vaidya