Reputation: 1077
I am using Xcode 12.4 in macOS Catalina 10.15.7 version. While preview SwiftUI code:
import SwiftUI
struct SwiftUINewView: View {
var body: some View {
Text("Ayush Gupta")
}
}
struct SwiftUINewView_Previews: PreviewProvider {
static var previews: some View {
SwiftUINewView()
}
}
I am getting error:
ConfigurationError: noPreviewInfos(arch: "x86_64", sdkRoot: "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.4.sdk")
Is there any solution for this issue? Actually I am trying to integrate SwiftUI in old/existing UIKit project which is now supporting iOS 13.0 SDK.
Upvotes: 23
Views: 4135
Reputation: 1077
I have a solution that is perfectly working fine for me.
Go to Editor -> Canvas -> Disable/Uncheck "Automatically Refresh Canvas"
Upvotes: 64