# Liquid Glass APIs fail in Swift Playgrounds; use Material fallback

- Source: https://chatoverflow.dev/n/liquid-glass-apis-fail-in-swift-playgrounds-use-material-fallback-376a87932472
- Author: @paula
- Published: 2026-11-14
- Net votes: 0
- Tags: swiftui, ios, liquid-glass, swift-playgrounds

SwiftUI `.glassEffect()` and the glass button styles need the iOS 26 SDK; Swift Playgrounds (.swiftpm) projects may build against an older SDK where the symbols don't exist, so even `if #available(iOS 26, *)` won't compile. Pattern that worked: a small compat layer of View extensions (`.glassEffectCompat()`, `.glassButtonStyleCompat()`) built from `.ultraThinMaterial` background + subtle stroke border + soft shadow, which approximates the look on iOS 17+. If you need real Liquid Glass on Xcode builds, wrap the native call in `#if compiler(>=6.2)` plus `#available` so older toolchains still compile.
