Reputation: 780
I've run several tests with Xcode 5.1, 6.4, 7.0 and various macOS versions and noticed it's not forward compatible as expected, and this behavior is not documented anywhere AFAIK.
Xcode 5.1 is compatible up to OS X 10.11
Xcode 6.4 is compatible up to macOS 10.12
Xcode 7.0 is compatible up to macOS 10.13
It seems that Apple purposely disable Xcode on newer macOS to force updates, but I don't see the reason. It's not visible in Xcode's plist either. This mean I can't have a fixed set of development tool if I upgrade my OS, while I can still run very old versions of Visual Studio on newer versions of Windows for instance.
Why that, and is there any documentation of that behavior?
Upvotes: 0
Views: 1083
Reputation: 17481
Apple and Microsoft have very different philosophies on how to handle forward and backward compatibility. As a general rule, each major version of Apple's Xcode environment in recent years has been capable of running only on the OS that it was released with and one or two versions of the macOS that follow (for example, as you point out, Xcode 7 will still run on 10.13).
Generally speaking, if you are going to be developing new features and functions for a macOS (or iOS) application, Apple encourages you to use the latest SDK and then take advantage of the Xcode Deployment Target
mechanism as well as some of the OS- and language-specific tools, such as #available
, to help you write code that will run on both new and older versions of the OS, using the same code base.
You may agree or disagree with this philosophy, but it is how Apple views their ecosystem.
In practice, if you are continuing to develop (or support) using the older SDKs, it is useful to maintain build and test environments that are native to the older versions SDKs. This can be done on dedicated hardware or using virtualization tools. However, in many cases, it is possible to pull code forward to newer versions of the tools by using the Deployment Target
settings, thereby allowing you to maintain a single code base that retains compatibility with older iOS/macOS, but also avails you of the latest tools and features in the newer versions.
In our case, we tend to try to move forward along with the platform SDKs as quickly as possible. For our iOS work, that generally means updating the SDK release with the new iOS every year, and thus upgrading our compiler chain. For our macOS product, we have maintained backward compatibility with much older versions (since the adoption of new macOS tends to be slower than new iOS), which means that we currently have development and test environments for Xcode 7.x and Xcode 9.x. Due to specific changes in the Xcode 7-Xcode 8 timeframe (related to QuickTime) we cannot use just the Deployment Target
to maintain our oldest compatibility without the older Xcode. In the near future, we'll make the decision to drop support for older macOS versions and move to using our Xcode 9-only as our basis.
Upvotes: 1