How to fix current Xcode version compatibility with a beta version of MacOS
Sergey Pekar
Senior iOS/Android application developer with more than 12 years of experience. Using swift, objective-c, java and Kotlin I carted a bunch of iOS and Android applications with millions of users across the globe.
At the begging of each summer at the WWDC Apple pleases developers and users all over the world by presenting their new versions of their operating systems. And more important they give developers access to the beta versions of their development tools.
But many developers are not hurry to update their working machines with beta software. And this makes sense as it is not stable enough. But there is much more important issue. Beta version of Mac OS could break compatibility with current Xcode version leaving you one to one with situation where you can prepare a new app to support new features of the platform (perhaps in additional brach) but without the ability to upload urgent or scheduled fix to the AppStore as it is not allowed to do so with beta software.
After that you have 3 options to fix it:
Perhaps the last part is the fastest one. But how? I got you covered. Below you can find the bash script that you should run to change Xcode version so system will treat it as the latest Xcode. This will save you significant amount of time. However I can not guarantee that it Xcode work 100% correctly (in my case Xcode display nothing in recent projects section) but at least it will work.
All you need is to create a text file with .sh extension and run it in terminal through sh <script_name>.sh .
Make sure you gave your terminal permission to manage apps. You can do it in system settings.
#!/bin/bash
set -euo pipefail
# Define paths to the release and beta Xcode installations
XCODE_RELEASE_PATH="/Applications/Xcode.app"
XCODE_BETA_PATH="/Applications/Xcode-beta.app"
# Retrieve the build numbers of the release and beta Xcode
XCODE_RELEASE_BUILD_VERSION=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${XCODE_RELEASE_PATH}/Contents/Info.plist")
XCODE_BETA_BUILD_VERSION=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${XCODE_BETA_PATH}/Contents/Info.plist")
# Display the build versions
echo "Release Xcode build version: ${XCODE_RELEASE_BUILD_VERSION}"
echo "Beta Xcode build version: ${XCODE_BETA_BUILD_VERSION}"
# Update the release Xcode build version to match the beta Xcode build version
sudo /usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${XCODE_BETA_BUILD_VERSION}" "${XCODE_RELEASE_PATH}/Contents/Info.plist"
# Open the release Xcode (this triggers a system check and cache refresh for the build version)
open "${XCODE_RELEASE_PATH}" || true
# Restore the release Xcode's original build version
sudo /usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${XCODE_RELEASE_BUILD_VERSION}" "${XCODE_RELEASE_PATH}/Contents/Info.plist"
As you can see on the screenshot below I have successfully managed to run Xcode 15 on MacOS sequoia.
? iOS Developer | Swift | SwiftUI | UIKit | Flutter
6 个月To run Xcode 15 on macOS 15, you can use the following method: Right-click on the Xcode 15 app and select "Show Package Contents". Go to the Contents folder. Open the MacOS folder. Double-click on the Xcode file to launch the application.