In Xcode 15 Live Previews are available for UIKit view controllers and views. However I noticed they do not work if the deployment target is < 17.0.
If I try to make a live preview for a view controller like so:
#Preview {
let someVC = ViewController()
return someVC
}
It doesn't load.
The error is described below:
== PREVIEW UPDATE ERROR: CompileDylibError: Failed to build ASwiftViewController.swift Compiling failed: module 'SwiftUI' has no member named 'VStack'
If I raise the deployment target to iOS 17 it starts working.