Getting Started with the Android Swift SDK

Another pair of preliminary bundles for people to test out, this time built from the latest Nov. 3 trunk snapshot tag. This was the first tag build to include @available(Android <API>, *) compile-time version checking and #available(Android <API>, *) runtime version checking for Android.

Unfortunately, there was no official trunk snapshot SDK bundle at swift.org for this tag, because a single test was only failing for 32-bit Android at the time, precipitating that tag build getting skipped for Android, so I disabled that test and built the SDK twice, once with NDK 28c and then with NDK 27d, and provide both SDK bundles for you to try out.

Using the new availability features requires building your Swift packages with NDK 28 and later: NDK 27 and before will not work. Try both bundles with NDK 28 and the new availability features and let us know what you find. Even if you do not use the new availability features at all, it is worth trying cross-compiling your packages with these bundles, because the new feature adds static version checking of most Bionic libc APIs.

Thanks to @madsodgaard for adding this long-wanted availability version checking feature! :grinning_face:

3 Likes