`if #unavailable(iOS 26.0)` transpiles to `if true`
iOS 26 provides a new .glassEffect() modifier, but you have to guard it behind if #available(iOS 26.0, *) blocks unless your app minimum version is iOS 26 or higher.
Unfortunately, #available knows nothing about Android; you can't write if #available(iOS 26.0, Android 34, *). As a result, the final * applies to Android; Skip Lite transpiles if #available(iOS 26.0, *) as simply if true.
But, to my surprise and alarm, if #unavailable(iOS 26.0) also transpiles to if true. I claim it should transpile to if false instead.
I should point out that I briefly thought that the reason if #unavailable(iOS 26.0) was transpiling to if true was that #unavailable doesn't have a final asterisk; I thought perhaps if #unavailable(iOS 26.0, *) would transpile to if false.
But, in fact, #available requires a final asterisk and #unavailable forbids a final asterisk, with this error:
Platform wildcard '*' is always implicit in #unavailable
In other words, #unavailable(iOS 26.0) should transpile to if false (or be omitted) because the * is implied.
Skip does only have limited support for understanding compiler directives. In general, unless it is #if SKIP or #if os(Android) (or a simple compound expression involving one of those two), the default behavior will be simply for Skip to treat it as true.
So for an iOS version check, you'll need to do something like:
#if !SKIP
if #available(iOS 26.0, *) {
someView.glassEffect()
}
#endif
if #unavailable isn't exactly a compiler directive. It's an actual runtime check, left in the code after compilation. (Note the # comes after the if here.)
https://docs.swift.org/swift-book/documentation/the-swift-programming-language/controlflow#Checking-API-Availability
if #unavailable is a very simple transpilation step, requiring no parsing at all of the content of the parentheses, and it's simply wrong right now, transpiling to if true when it should be if false.
I'm just describing how it works right now. We would like to improve the handling of the parsing here.
My point is that "improving the parsing" is not what's called for here. It's just changing the hardcoded if true to if false.