I'm still confused, though I'm happy to be shown the confusion is in my head rather than the proposal. In the Swift Language Guide, it says about
*argument is required and specifies that on any other platform, the body of the code block guarded by the availability condition executes on the minimum deployment target specified by your target.
#available(iOS 13, *) is
true when compiling for iOS deployment in any range that includes version 13, and
true in any compilation for tvOS deployment. Right?
#unavailable(iOS 13, *) is obviously the negation of the
#available value when compiling for iOS, what is the value for tvOS compilations?
If it's always
falsefor tvOS, then the
*in the syntax is a bit hard to explain. It means something different when it's used with
#unavailablethan when used with
#available. In that case, the syntax would be much clearer as
!#available(iOS 13, *), rather than
#unavailable(iOS 13, *).
#unavailablewould be actively misleading to the unwary.
If it's always
truefor tvOS, then the syntax
!#available(iOS 13, *)must not be allowed, because it suggests a negation that isn't actually happening.
Edit: Actually, after writing that down and reading it back, I see I probably asked the wrong question. Regarding tvOS, if
#available(iOS 13, *) means "available on all", does
#unavailable(iOS 13, *) mean "unavailable on all" or "unavailable on some"? There's a negation and a logical quantification happening per platform, I think, but the order isn't obvious.