JetKVM Is Now Available for Retail Purchase
#HackerNews #JetKVM #Retail #Purchase #JetKVM #Now #Available #Tech #News #Virtualization
#Tag
JetKVM Is Now Available for Retail Purchase
#HackerNews #JetKVM #Retail #Purchase #JetKVM #Now #Available #Tech #News #Virtualization
The if #available(macOS 26, 😉 { … } checks required to call newer APIs from apps that still run on older OSes are really cumbersome to use in SwiftUI.
This technique from @davedelong makes this much nicer and easier: https://davedelong.com/blog/2021/10/09/simplifying-backwards-compatibility-in-swift/
You might still have to do some manual mapping of enums and constants, but that ugliness is contained, leaving your call sites clean.
Since the dawn of SwiftUI, I've been using the (ill-advised, for multiple reasons) custom `if` view modifier as a last resort, which uses basically the same technique as the @davedelong's "Backport" system (with the same downsides, I imagine).
But you can't put an #available(…) check inside an `if` view modifier, and I've been annoyed by this for years. It turns out I just needed to make a slight change to make this work. 🙏
The if #available(macOS 26, 😉 { … } checks required to call newer APIs from apps that still run on older OSes are really cumbersome to use in SwiftUI.
This technique from @davedelong makes this much nicer and easier: https://davedelong.com/blog/2021/10/09/simplifying-backwards-compatibility-in-swift/
You might still have to do some manual mapping of enums and constants, but that ugliness is contained, leaving your call sites clean.
A space for Bonfire maintainers and contributors to communicate