Ask HN: Why does Xcode require you to upgrade OS to view swift UI preview?
I do not understand why I have to upgrade the enter operating system just so Swift Ui preview can work on Xcode?
Any apple engineers that can shed some light on this?
https://stackoverflow.com/questions/56678354/xcode-11-beta-swift-ui-preview-not-showing I would think it's because Xcode uses the implementation of SwiftUI present in the OS to render the preview, which is only present in Catalina and not in Mojave. I presume they didn't think it worth the effort to re-implement SwiftUI rendering within Xcode itself just to support the older OS. During early development it did run but a large number of changes to AppKit and other frameworks were required. Over time too many. SwiftUI as embedded in Xcode had more and more divergent behavior when running on Mojave. Serious breaking bugs in layout and behavior that could not be fixed without large changes to AppKit. It's a catch-22: backport the changes and risk breaking working apps, or don't and require people to upgrade. Folks usually don't like major changes in dot releases that can destabilize things.