Xcode 14 is required by macOS Ventura. But if, in case you want to use your old version of Xcode (eg Xcode 13), you can launch it directly from the finder or from the terminal.
To open in finder navigate to:
Applications Folder
> FindXcode App
> Right click on the app and click onShow Package Contents
> OpenContents
> OpenMacOS
> and launchXcode
.
Or
Run the following command in the terminal:
open /Applications/Xcode.app/Contents/MacOS/Xcode
.
As this problem in principle is the same problem as last year, when we wanted to run Xcode 12 on macOS Monterey, it is worth to check last year's question on the same problem . There, I found this great answer in which a script is proposed that only needs to be run once to fix the problem (allowing a regular opening of Xcode 13, eg via double click). The script works by changing the build version of the old Xcode 13 to the build version of the new Xcode 14, thereby tricking the OS.
Before running the script, you need to change the OLD_XCODE
and NEW_XCODE
variables to the correct path .
#!/bin/sh
set -euo pipefail
# Set the paths to your Old/New Xcodes
OLD_XCODE="/Applications/Xcode-13.4.1.app"
NEW_XCODE="/Applications/Xcode-14.1.0.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
For my future self, when I prematurely upgrade my macOS to the latest version.
Since I'm using Xcode just for a building purposes for my Flutter app and I don't really care about Xcode UI, all I needed to do is:
Xcode-<version>.app
/Applications
directoryxcode-select
command: xcode-select -s /Applications/Xcode-<version>.app
xcode-select -p
That way I can have multiple Xcode app versions and I can quickly switch between them.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.