Running newest Xcode on older macOS version

Publish date: September 20, 2023

Tags: swift, ios, tips and tricks

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 greated with the following annoying dialog:

MacOS alert asking you to update to the lastest MacOS version

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.


  1. Copy the Info.plist file to your Desktop
    • For safety reasons, create another copy called Info-backup.plist just in case you make a mistake
  2. Open it with Xcode
  3. Modify the Minimum system version to be equal or lower than your current macOS version
    • You can find your current macOS version under  -> About This Mac
  4. Save the file
  5. Copy the modified Info.plist back to Xcode.app/Content/Info.plist and 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:

1
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user

Voilà, 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:

1
plutil -convert xml1 Info.plist

You can then look for the key LSMinimumSystemVersion, modify the associated string value, saving the changes, and finally converting it back to binary, by running:

1
plutil -convert binary1 Info.plist

You 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!