Visibility.h has been modified since the module file ... was built?

SwiftUI Previews in Xcode 13.2.1 (13C100) are failing for me with:

file '/Applications/' has been modified since the module file '/var/folders/s_/v2rt7nls5794blqbt6c_gl9c0000gn/C/clang/ModuleCache/2LAIGLYLJJQNA/SwiftShims-2TTN5UXQBRCCQ.pcm' was built: mtime changed

This is after quitting Xcode, deleting derived data, starting Xcode again and building from scratch. Anyone else seeing this problem? Any idea how to fix it?

Post not yet marked as solved Up vote post of ratkins Down vote post of ratkins


I also have this issue. When I resume my SwiftUI preview, Xcode show this error. This is very weird that my app's status bar icon missing after this error, even include the release version.

Hi! Try to remove this file. Run command in Terminal

rm /var/folders/s_/v2rt7nls5794blqbt6c_gl9c0000gn/C/clang/ModuleCache/2LAIGLYLJJQNA/SwiftShims-2TTN5UXQBRCCQ.pcm
Add a Comment

had this error too deleted the file it referenced and it worked