Easier way to check for availability of concurrency?

right now i am writing

#if swift(>=5.5)
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)

everywhere.

this is quite a mouthful to remember. is there an easier to way to gate code that uses async/await?

1 Like

From the Concurrency adoption guidelines:

#if compiler(>=5.5) && canImport(_Concurrency)
...
#endif
11 Likes