You’re now watching this thread. If you’ve opted in to email or web notifications, you’ll be notified when there’s activity. Click again to stop watching or visit your profile to manage watched threads and notifications.
You’ve stopped watching this thread and will no longer receive emails or web notifications when there’s activity. Click again to start watching.
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...
file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/usr/lib/swift/shims/RuntimeStubs.h' has been modified since the module file '/var/folders/kv/t_w2wdds3m1_0lr02hcp3dgw0000gn/C/clang/ModuleCache/12TRQXIDQ8QQD/SwiftShims-2TTN5UXQBRCCQ.pcm' was built: mtime changed
----------------------------------------
CompileDylibError: Failed to build ContentView.swift
Compiling failed: file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/usr/lib/swift/shims/RuntimeStubs.h' has been modified since the module file '/var/folders/kv/t_w2wdds3m1_0lr02hcp3dgw0000gn/C/clang/ModuleCache/12TRQXIDQ8QQD/SwiftShims-2TTN5UXQBRCCQ.pcm' was built: mtime changed
<unknown>:0: error: file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/usr/lib/swift/shims/RuntimeStubs.h' has been modified since the module file '/var/folders/kv/t_w2wdds3m1_0lr02hcp3dgw0000gn/C/clang/ModuleCache/12TRQXIDQ8QQD/SwiftShims-2TTN5UXQBRCCQ.pcm' was built: mtime changed
<unknown>:0: note: please rebuild precompiled header '/var/folders/kv/t_w2wdds3m1_0lr02hcp3dgw0000gn/C/clang/ModuleCache/12TRQXIDQ8QQD/SwiftShims-2TTN5UXQBRCCQ.pcm'
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "LibcOverlayShims.h"
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/usr/lib/swift/shims/LibcOverlayShims.h:21:2: error: file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/usr/lib/swift/shims/RuntimeStubs.h' has been modified since the module file '/var/folders/kv/t_w2wdds3m1_0lr02hcp3dgw0000gn/C/clang/ModuleCache/12TRQXIDQ8QQD/SwiftShims-2TTN5UXQBRCCQ.pcm' was built: mtime changed
#include "Visibility.h"
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/usr/lib/swift/shims/LibcOverlayShims.h:21:2: note: please rebuild precompiled header '/var/folders/kv/t_w2wdds3m1_0lr02hcp3dgw0000gn/C/clang/ModuleCache/12TRQXIDQ8QQD/SwiftShims-2TTN5UXQBRCCQ.pcm'
#include "Visibility.h"
^
<unknown>:0: error: missing required module 'SwiftOverlayShims'
==================================
| BuildInvocationError
|
| /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc -F /Applications/Xcode.app/Contents/SharedFrameworks-iphonesimulator -enforce-exclusivity=checked -DDEBUG -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk -target x86_64-apple-ios15.2-simulator -Xfrontend -serialize-debugging-options -enable-testing -swift-version 5 -I /Users/bergersilvio/Library/Developer/Xcode/DerivedData/testestest-bsifesglpnsjuzelmwqyilaafjkw/Build/Intermediates.noindex/Previews/testestest/Products/Debug-iphonesimulator -F /Users/bergersilvio/Library/Developer/Xcode/DerivedData/testestest-bsifesglpnsjuzelmwqyilaafjkw/Build/Intermediates.noindex/Previews/testestest/Products/Debug-iphonesimulator -emit-localized-strings -emit-localized-strings-path /Users/bergersilvio/Library/Developer/Xcode/DerivedData/testestest-bsifesglpnsjuzelmwqyilaafjkw/Build/Intermediates.noindex/Previews/testestest/Intermediates.noindex/testestest.build/Debug-iphonesimulator/testestest.build/Objects-normal/x86_64 -c -j8 -serialize-diagnostics -Xcc -I/Users/bergersilvio/Library/Developer/Xcode/DerivedData/testestest-bsifesglpnsjuzelmwqyilaafjkw/Build/Intermediates.noindex/Previews/testestest/Intermediates.noindex/testestest.build/Debug-iphonesimulator/testestest.build/swift-overrides.hmap -Xcc -iquote -Xcc /Users/bergersilvio/Library/Developer/Xcode/DerivedData/testestest-bsifesglpnsjuzelmwqyilaafjkw/Build/Intermediates.noindex/Previews/testestest/Intermediates.noindex/testestest.build/Debug-iphonesimulator/testestest.build/testestest-generated-files.hmap -Xcc -I/Users/bergersilvio/Library/Developer/Xcode/DerivedData/testestest-bsifesglpnsjuzelmwqyilaafjkw/Build/Intermediates.noindex/Previews/testestest/Intermediates.noindex/testestest.build/Debug-iphonesimulator/testestest.build/testestest-own-target-headers.hmap -Xcc -I/Users/bergersilvio/Library/Developer/Xcode/DerivedData/testestest-bsifesglpnsjuzelmwqyilaafjkw/Build/Intermediates.noindex/Previews/testestest/Intermediates.noindex/testestest.build/Debug-iphonesimulator/testestest.build/testestest-all-target-headers.hmap -Xcc -iquote -Xcc /Users/bergersilvio/Library/Developer/Xcode/DerivedData/testestest-bsifesglpnsjuzelmwqyilaafjkw/Build/Intermediates.noindex/Previews/testestest/Intermediates.noindex/testestest.build/Debug-iphonesimulator/testestest.build/testestest-project-headers.hmap -Xcc -I/Users/bergersilvio/Library/Developer/Xcode/DerivedData/testestest-bsifesglpnsjuzelmwqyilaafjkw/Build/Intermediates.noindex/Previews/testestest/Products/Debug-iphonesimulator/include -Xcc -I/Users/bergersilvio/Library/Developer/Xcode/DerivedData/testestest-bsifesglpnsjuzelmwqyilaafjkw/Build/Intermediates.noindex/Previews/testestest/Intermediates.noindex/testestest.build/Debug-iphonesimulator/testestest.build/DerivedSources-normal/x86_64 -Xcc -I/Users/bergersilvio/Library/Developer/Xcode/DerivedData/testestest-bsifesglpnsjuzelmwqyilaafjkw/Build/Intermediates.noindex/Previews/testestest/Intermediates.noindex/testestest.build/Debug-iphonesimulator/testestest.build/DerivedSources/x86_64 -Xcc -I/Users/bergersilvio/Library/Developer/Xcode/DerivedData/testestest-bsifesglpnsjuzelmwqyilaafjkw/Build/Intermediates.noindex/Previews/testestest/Intermediates.noindex/testestest.build/Debug-iphonesimulator/testestest.build/DerivedSources -Xcc -DDEBUG=1 -working-directory /Users/bergersilvio/SynologyDrive/021_Apps/Swift/testestest /Users/bergersilvio/Library/Developer/Xcode/DerivedData/testestest-bsifesglpnsjuzelmwqyilaafjkw/Build/Intermediates.noindex/Previews/testestest/Intermediates.noindex/testestest.build/Debug-iphonesimulator/testestest.build/Objects-normal/x86_64/ContentView.1.preview-thunk.swift -o /Users/bergersilvio/Library/Developer/Xcode/DerivedData/testestest-bsifesglpnsjuzelmwqyilaafjkw/Build/Intermediates.noindex/Previews/testestest/Intermediates.noindex/testestest.build/Debug-iphonesimulator/testestest.build/Objects-normal/x86_64/ContentView.1.preview-thunk.o -module-name testestest_PreviewReplacement_ContentView_1 -Onone -Xfrontend -disable-modules-validate-system-headers -gline-tables-only
Any help would be greatly appreciated as at the moment, I don't have a running development environment unfortunately...