This solution works.
I previously used it like this @available(iOSApplicationExtension 17.0, *) and it worked till beta 5 or 6, I don't remember now. But then broke.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: