How do you update Xcode on OSX to the latest version?

后端 未结 12 1513
清歌不尽
清歌不尽 2020-11-30 19:38

What is the easiest way to update Xcode on OSX?

I see this in the terminal:

$ brew install xxxxxxx
Warning: Your Xcode (4.3.3) is outdated
Please ins         


        
相关标签:
12条回答
  • 2020-11-30 20:29

    Another best way to update and upgrade OSX development tools using command line is as follows:

    Open terminal on OSX and type below commands. Try 'sudo' as prefix if you don't have admin privileges.

    brew update
    

    and for upgrading outdated tools and libraries use below command

    brew upgrade
    

    These will update all packages like node, rethinkDB and much more.

    Also, softwareupdate --install --all this command also work best.

    Important: Remove all outdated packages and free some space using the simple command.

    brew cleanup
    
    0 讨论(0)
  • 2020-11-30 20:35

    softwareupdate --list see the list of outdated software.

    softwareupdate --install --all update all outdated software.

    softwareupdate --install <product name> update the software you named.

    0 讨论(0)
  • 2020-11-30 20:35

    I used the Command_Line_Tools_OS_X_10.XX_for_Xcode_7.2.dmg and therefore had to download the latest version from here.

    0 讨论(0)
  • 2020-11-30 20:38

    You can try mas-cli (Mac Apple Store cli). Github project here

    It would be

    $ brew install mas
    $ mas list
    $ mas search Xcode
    $ mas install <id> 
    
    $ mas upgrade <id>
    

    upd:

    Had issues installing Xcode 12.2 in Big Sur. Solved them by entering into the App Store from the devs link.

    https://developer.apple.com/download/release/

    0 讨论(0)
  • 2020-11-30 20:41

    If attempting to download via the App Store leaves you with a little grey spinner and nothing actually happening, then you can go to :

    https://developer.apple.com/download/more/

    log in with your Apple Developer ID, and the latest Xcode should be available as a .zip download.

    0 讨论(0)
  • 2020-11-30 20:41

    You DO NOT need to upgrade Xcode.

    Just open the file /usr/local/Homebrew/Library/Homebrew/extend/os/mac/diagnostic.rb ,

    then remove this line check_xcode_minimum_version in the following function.

    def fatal_build_from_source_checks
        %w[
          check_xcode_license_approved
          check_xcode_minimum_version //<-- this one
          check_clt_minimum_version
          check_if_xcode_needs_clt_installed
        ].freeze
        end
    

    Then brew install should works fine.

    0 讨论(0)
提交回复
热议问题