
Ask HN: Why does Xcode require you to upgrade OS to view swift UI preview? - vuyani
I do not understand why I have to upgrade the enter operating system just so Swift Ui preview can work on Xcode?<p>Any apple engineers that can shed some light on this?<p>https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;56678354&#x2F;xcode-11-beta-swift-ui-preview-not-showing
======
smallduck
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.

~~~
xenadu02
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.

