For anyone who has trouble installing Xcode because they are stuck to an older version of MacOS because their hardware doesn’t support the newest version there are two solutions:
- If you have ever gotten Xcode from the Mac App Store before: you can still download that old version: go to you account page in the App Store and download Xcode from there. It will install the latest version that is compatible with your MacOS version.
- If you have never downloaded Xcode before this won’t work for you. But you may be able to get your old hardware to run the newest version of MacOS by using Opencore Legacy Patcher (google it). I’m running Sonoma on a Mac from 2008… But: this is not for the faint of heart, and be sure to read all the warnings and check that you Mac is actually compatible.