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.
I have a solution that is perfectly working fine for me.
Go to Editor -> Canvas -> Disable/Uncheck "Automatically Refresh Canvas"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With