Running newest Xcode on older macOS version
Every year, Apple releases a new macOS version, and a new version of Xcode. Seemingly these are tied together, and you cannot use the lastest version of Xcode, without first upgrading to the latest macOS version.
After spending a good hour with downloading and extracting the latest Xcode version, if you try to run it, you will be greeted with the following annoying dialog:
I’m personally usually not very fond of upgrading to the latest macOS version ever since the horrible change to notifications, so I try to delay it until it’s absolutely necessary.
Luckily, this alert is a big ass lie. You can verify this by right-clicking the Xcode.app -> Show Package Contents, and running the binary Contents/MacOS/Xcode. All of a sudden, Xcode will run no problem. WTF?
Workaround
The alert is shown based on the LSMinimumSystemVersion in the Info.plist file that comes inside Xcode.app. If you open this file, you will see Minimum system version with a value of 13.5 in case of Xcode 15.
All we need to do to get it to run is to simply modify this value.
- Copy the
Info.plistfile to your Desktop- For safety reasons, create another copy called
Info-backup.plistjust in case you make a mistake
- For safety reasons, create another copy called
- Open it with Xcode
- If you don’t have a running version of Xcode installed, refer to Modifying Info.plist without Xcode
- Modify the
Minimum system versionto be equal or lower than your current macOS version- You can find your current macOS version under
-> About This Mac
- You can find your current macOS version under
- Save the file
- Copy the modified
Info.plistback toXcode.app/Content/Info.plistand override the existing one
At this point, if you try to run Xcode.app, you might still get the alert. This is because Launch Services keeps an internal cache. Run the following command to purge it:
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain userVoilà, Xcode is working!
Keep in mind, you will need to repeat the same steps the Simulator app as well. You can find it under Xcode.app/Contents/Developer/Applications/Simulator.app. Then another Show package content, and modify the Info.plist as you did before.
Modifying Info.plist without Xcode
The bundled Info.plist file has a Binary format, therefore modifying it with existing text editors is quite difficult.
You can convert it to XML, by running:
plutil -convert xml1 Info.plistYou can then look for the key LSMinimumSystemVersion, modify the associated string value, saving the changes, and finally converting it back to binary, by running:
plutil -convert binary1 Info.plistYou can then copy and override the original file located at Xcode.app/Contents/Info.plist.
Conclusion
You have seen how you can run Xcode in an older macOS version than originally intended.
If you encounter any issues that I did not cover, or you would like to give feedback, feel free to get in touch at moc.htikmsofi@gomlb!