Cannot preview in this file -- Unexpected error occurred
Sometimes, refreshing works by clicking the Try Again button, but usually that takes multiple tries. When I click the Diagnostics button, the following error is shown:
Code Block HumanReadableSwiftError ConfigurationError: noPreviewInfos(arch: "x86_64", sdkRoot: "/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.2.sdk")
This happens both in Xcode 12 and the beta Xcode 12.2. Who has a solution for this?
That fixed it. So, it's not the source files themselves, it's something in the project file(s). I did a manual diff between the <projectname>.xcodeproj/project.pbxproj of the old and the new project, but I gave up after staring 15 minutes at the incredibly messy diff. Preview now work.