Why You Can’t Use Async/Await

It’s a powerful new feature in Swift 5.5… but you‘ll have to await for it...

Michael Long
7 min readJul 16, 2021

--

Or not. Apple listened to us, for once, and async/await, actors, and other structured concurrency features have been back-ported and are now available for iOS 13 and 14 and other earlier macOS and tvOS platforms.

For more read my latest article: Apple Listened: You No Longer Need To Wait For Async.

The following is relevant only for historical purposes.

With Actors and Async/Await, Apple has finally brought modern, asynchronous concurrency support to the Swift language. The syntax and concepts are powerful, clean, and elegant.

But Async/Await and Actors both suffer from a single, minor, almost insignificant issue… we can’t use them in our code.

I’ve written about this problem again and again in regard to SwiftUI, another one of the great new paradigms that Apple’s made available to developers. Or, at least, made available to some developers.

Let me explain.

The UIStackView problem

It was WWDC 2015, and I remember watching the introduction of UIStackView and starting to get excited. I watched the Mysteries of Auto Layout sessions and got even more…

--

--

Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.