My Preview Canvas does not work anymore.
I already uninstalled and freshly reinstalled Xcode (App Store Version and direct download from developer.apple.com, version 13.2 with Big Sur and now updated to Monterey 12.1). I uninstalled Xcode using AppCleaner and also by clearing the clang/cache folders, as well as Lib/Dev... etc. manually, but the same error comes up over and over again.
When I run the code directly (via Run/Simulator instead of Preview/Canvas) the app shows up and works just fine.
I open Xcode, I create a new project for iOS, I resume the preview and it fails with the attached error...
Any help would be greatly appreciated as at the moment, I don't have a running development environment unfortunately...
Thanks in advance.
Best regards Silvio
This fixed it for me:
- Finder > Go to folder "/var/folders/kv/t_w2wdds3m1_0lr02hcp3dgw0000gn/C/clang/ModuleCache/12TRQXIDQ8QQD/"
- Remove "SwiftShims-2TTN5UXQBRCCQ.pcm" (I kept a copy on my desktop just in case)
- Run a build in the simulator
- Preview now works (for me at least)
Hope this works for you.