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?
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
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.
Printing the version of Xcode currently used by my tools
xcode-select --print-path
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
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.
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.
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
This works for me I'm using vanilla titanium CLI.
Switch to desired Xcode version followed by ti setup for ios
sudo xcode-select -switch /path/to/Xcode.app/Contents/Developer/
ti setup ios
If you do a lot of work in both the current and beta version of Xcode run sudo xcode-select --switch /Applications/Xcode.app to select the default xcode and rename the beta Xcode to XcodeBeta.app or Xcode10.app.
Whenever you want to upgrade just rename the Xcode and restart terminal.
Related
i have download and installed the Xcode 12.4 from apple site (not apple store) because I am using macOS Catalina 10.15.7 and the latest Xcode version right now requires at-least BigSur 11.0. I have also installed the latest Xcode command line tools.
But when i try to open my react native project in Xcode simulator from terminal using npm run ios it says,
"Xcode needs to be installed (don't worry, you won't have to use it), would you like to continue to the App Store? › (Y/n)"
By the way, I am a new mac user so, i don't know much about it yet. So, any kind of help will be appreciated.
My bad, i have not selected the installed command line tools in Xcode. If anybody got this issue then make sure you also select the installed command line tools. Simply open Xcode, go to preference -> locations -> command line tools.
If you're having this issue, running this in the terminal may fix it for you.
sudo xcode-select -s /Applications/Xcode.app
Open Xcode
go to settings
go to locations tab
select an Xcode version in the select labeled "Command Line Tools"
Is possible to change between building by Xcode 10 and Xcode 11 beta?
Maybe by editing by config file etc.?
I have installed both and I need to switch between them.
Is it possible?
If you want to swtich between multiple versions of Xcode, xcode-select should do the job.
Print current version path
xcode-select -p
To switch
xcode-select -s path-to-different-version
I installed two commmand line tools on my mac.
So I want to switch command line tools.
How I can do it?
I tried switch from Xcode preferences > Locations > Command line tools.
However, Command line tools beta 1 for Xcode 10 is not appear on this menu.
Xcode 9.4 is installed on my mac.
macOS 10.13.5
Xcode 9.4 command line tools (bundled with Xcode9.4, it installed at /Applications/Xcode.app/Contents/Developer)
Command line tools beta1 for Xcode 10 (not bundled with Xcode, it installed at /Library/Developer)
Use this command in terminal to switch xcode:
sudo xcode-select -s /Applications/Xcode-beta.app
See: https://medium.com/#maximbilan/switch-command-line-tools-to-xcode-beta-2e99c54cb147
call Xcode.app like this:
sudo xcode-select -s /Applications/Xcode.app
if you're downgrading from Xcode Beta version
You can use .bash_profile to add alias to switch 2 versions:
alias Xcode13='sudo xcode-select -s /Applications/Xcode\ 13.app'
alias Xcode14='sudo xcode-select -s /Applications/Xcode.app'
Most important:
use source ~/.bash_profile to make the command effective.
Then, input Xcode14 to switch the Xcode version.
For normal versions
Execute on the terminal the following code:
xcode-select --install
For beta versions
Once you have install your xcode-beta.
Install your commands line tools like usual, using the following code on your terminal
xcode-select --install
One you have installed commands line tools is the step to download the new ones
To do this, open your browser and look for apple developer resources download
Select view additional downloads, you will need to logIn in order to continue.
Once you have logIn, look for the file you are interested in, in my case was Additional Tools for Xcode 14 beta 5
Select download and wait.
Once is downloaded if you try to open it, you will see the following content on the folder.
It is time to open xcode
Look for xcode<preferences
Search for Locations.
And on command line tools select the ones you just downloaded
I have install 2 Xcode version 10, 11 and can switch them. But both of them have install on Applications.
- Applications/Xcode.app
- Applications/Xcode 10/Xcode.app
May be you should move it to Applications inside folder like me.
I ran into this error trying to push to git, when I typed git init.
xcrun: error: invalid active developer path
(/Library/Developer/CommandLineTools), missing xcrun at:
/Library/Developer/CommandLineTools/usr/bin/xcrun
I tried the following solutions.
xcode-select —install
sudo xcode-select -switch
sudo xcode-select —install
brew doctor
brew update
brew upgrade
brew cleanup
This is all you need to do:
$ xcode-select --install
You can select command line tools from the XCode Preferences shown in the screenshot below.
You will get a prompt for password.
1)
try typing in "xcode-select -print-path" and see if the path you see is the path you're expecting for your current Xcode version.
2)
If you go to:
https://developer.apple.com/downloads/
(you'll need to sign in with your Apple Developer account)
Once there, you'll see links for "Command Line Tools". It sounds like you need to install MacOS 10.11 Command Line Tools for Xcode 7.
Try:
sudo xcode-select -r
in this way it unsets any user-specified developer directory, so that the developer directory will be found via the default search mechanism.
If you have Catalina and Xcode 11 and you have this problem, then go to Xcode Preferences and select Location tab, check that the Command Line tool dropdown has Xcode 11.0 selected. If Xcode 11 is not there then you need to download and install Command-line tools for Xcode 11 here (choose the correct Beta)
https://developer.apple.com/download/more/?=command%20line%20tools
i have just installed the xcode 6 beta and uninstalled the xcode 5 version simply by moving to trash and empyting it. However whenever i try to use git and other terminal commands mac prompts me to install xcode, but i already have one installed, a beta version. How can i use that beta as a default xcode and use git and other features from it on terminal?
Did you have set them as the same name and same foler as it saved in your computer? If you didn't know, try to open terminal and input these code "xcode-select -print-path". Check the displayed information and look whether it is as same as you setted. If wasn`t the same, change it (Input these code "xcode-select -switch ").