Last week's Elements build added a small but pretty nifty feature to EBuild: automatic download of new SDKs.
As you might know, for the Cocoa and Island platforms, Elements uses a set of pre-imported
.fx files to build against the native platform APIs. These
.fx files are specific to each version of the platform/operating system – which is especially relevant on Cocoa where Apple ships new minor SDK versions all the time, and any given build of Xcode (which bundles Apple's developer toolchain only has support for a single version of each OS).
What happened in the past was than when you hit "build" on a Cocoa project (say, an iOS app), EBuild would take a look at both what versions your local copy of Xcode supports (in recent days, that's a single one – e.g. Xcode 11.3 only supports iOS 13.2; not 13.0, not 12.x, nor 13.4), and what versions you had
.fx files installed as part of Elements.
If there was no common match, the build would fail, asking you to upgrade Xcode, or manually grab older (or newer)
.fx files from our website or import them yourself. Not ideal.
Of course a whole set of
.fx is not small, so the more flexibility we shipped, the larger the download for Elements, and the larger the Fire .app bundle became. We had to balance between convenience (ship a couple common versions) and size.
Starting with build .2475, EBuild still performs the check mentioned above. But it goes a step further: if not common match between what you have installed and what's supported in Xcode is found, EBuild will reach out to the network, see if there's a set of
.fx files that match, and download those for you (only once, the first time you need this new version). Aside form a slightly longer first build, for the download, the whole thing will seem seamless for you.
The first scenario where this will be helpful arrived just this week. Apple shipped a new Xcode beta with new SDKs on Wednesday — Xcode 11.4 Beta 1 adds new iOS 13.4, tvOS 13.4 and watchOS 6.2 SDKs. By yesterday, we had them imported and ready to be used and downloaded.
Now, in the past, we'd have included these new beta SDKs in today's new Elements build, .2481, to make sure everyone who wants to use Xcode 11.4 is covered. But that bloats the download (because we can't really drop the previous version yet), plus it would require everyone to update immediately to get the new SDK support.
Thanx to the new feature, thats no longer the case. The moment the new
.fx files were uploaded to our server, anyone was able to seamlessly use them – just install Xcode 11.4, rebuild your project, and EBuild does the rest!
Automatic SDK download is available for Cocoa and all Island platforms.