I've been successful using SwiftUI for a few months with very little Xcode experience. I'm trying to add some simple help screens that I would like to preview in the SwiftUI canvas. However, I'm receiving the following error:
OptimizationLevelError: not building -Onone
The message is shown when pressing the "diagnostics" button. Problem persists after pressing "try again" button.
Xcode: Version 11.3 (11C29)
Catalina: 10.15.2 (19C57)
The code could not be simpler:
import SwiftUI
struct HelpSortView: View {
var body: some View {
VStack {
Text("You can sort the list by Name, Sail Number, Class, or Favorites.")
.lineLimit(10)
VStack(alignment: .center) {
Image("help-sort")
}
}
}
}
struct HelpSortView_Previews: PreviewProvider {
static var previews: some View {
HelpSortView()
}
}