skip to Main Content

I am facing a problem running older versions of Xcode on newer MacOS versions.
For example, Xcode 13 on MacOS Ventura.

5

Answers


  1. Chosen as BEST ANSWER

    The solution is very simple. If you have the older version downloaded in your Applications folder for example, lets say 12.5.1 version, you just need to:

    • Open Terminal
    • Open Applications folder in Finder
    • Drag the Xcode app into Terminal so it gets its path
    • Then add this next to it: /Contents/MacOS/Xcode, so the full command will be something like /Applications/Xcode-12.5.1.app/Contents/MacOS/Xcode
    • Press enter to run the command

    Now you should be able to run it. You will note that when you open this version of Xcode, the Terminal will open too, but don't close Terminal because it will close the Xcode too.

    Here you can find older Xcode versions.


  2. Change the paths to OLD/NEW Xcodes and run script. The script will change the build version of the old Xcode to the new one, run it and restore. Script needs to be run once, after that Xcode can be opened via double click

    Works on macOS Monterey for Xcode 12.5.1 and Ventura for Xcode 13

    #!/bin/sh
    
    set -euo pipefail
    
    # Set the paths to your Old/New Xcodes
    OLD_XCODE="/Applications/Xcode_13.4.1.app" # or /Applications/Xcode_12.5.1.app on Monterey
    NEW_XCODE="/Applications/Xcode.app" # To get build number
    
    # Get New Xcode build number
    OLD_XCODE_BUILD=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" ${OLD_XCODE}/Contents/Info.plist)
    NEW_XCODE_BUILD=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" ${NEW_XCODE}/Contents/Info.plist)
    
    echo The Old Xcode build version is $OLD_XCODE_BUILD
    echo The New Xcode build version is $NEW_XCODE_BUILD
    
    # Change Old Xcode build version to New Xcode
    /usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${NEW_XCODE_BUILD}" ${OLD_XCODE}/Contents/Info.plist
    
    # Open Old Xcode (system will check build version and cache it)
    open $OLD_XCODE
    
    # Revert Old's Xcode's build version
    /usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${OLD_XCODE_BUILD}" ${OLD_XCODE}/Contents/Info.plist
    
    Login or Signup to reply.
  3. This is how you get your xcode’s current build version.

    /usr/libexec/PlistBuddy -c "Print CFBundleVersion" /Applications/Xcode_12.4.app/Contents/Info.plist
    
    Login or Signup to reply.
  4. If you are looking for a solution without using terminal every time, here it is:

    1. Follow https://stackoverflow.com/a/69995053/14199447

    2. Create a bash file with this content

      #!/bin/bash
      
      /Applications/Xcode-12.5.1.app/Contents/MacOS/Xcode
      
    3. Open terminal, run chmod 700 YourBashFile.sh

    4. Change the default opening app of YourBashFile to terminal.

    5. Follow step 1 and 2 of this https://apple.stackexchange.com/a/407885 to create an executable application which you can put on your Dock. After this you should be able to use the new app like any other app.

    Login or Signup to reply.
    1. Download and install older Xcode releases from here:

    https://xcodereleases.com/

    1. Login will be required with your Apple Developer credentials.

    2. Download and uncompress installer:

    e.g. Xcode_13.4.1.xip

    1. from Terminal run:

      open /Applications/Xcode.app/Contents/MacOS/Xcode

    2. Accept agreement and setup any development parameters as needed.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search