Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

attilakalel

macrumors newbie
Original poster
Oct 2, 2015
18
2
hopefully I can get some help on this, I've been trying to understand why, even when I create a new project I get the 'failed to build ContentView.swift' error.

Literally just opened Xcode the other day for the first time in a long time to do some work and the error started appearing.

I have uninstalled, reinstalled Xcode, even so far as to downgrade the version but to no avail.

full error is below:

file '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.2.sdk/usr/lib/swift/shims/Visibility.h' has been modified since the module file '/var/folders/0q/_h1zyvxd6cd7plpw0gjdsy3w0000gn/C/clang/ModuleCache/1GS1IUNF6IO19/SwiftShims-2TTN5UXQBRCCQ.pcm' was built: mtime changed
 

casperes1996

macrumors 604
Jan 26, 2014
7,496
5,669
Horsens, Denmark
Never seen it but I would advice trying to delete the cache file it references in the error - I assume you get no other error indicators than what you posted?
 

attilakalel

macrumors newbie
Original poster
Oct 2, 2015
18
2
Never seen it but I would advice trying to delete the cache file it references in the error - I assume you get no other error indicators than what you posted?
deleted the file it referenced and it works, don't understand how it would happen all of a sudden as it was working perfectly fine till the error, no warning just straight to the fail.
 

casperes1996

macrumors 604
Jan 26, 2014
7,496
5,669
Horsens, Denmark
deleted the file it referenced and it works, don't understand how it would happen all of a sudden as it was working perfectly fine till the error, no warning just straight to the fail.

It looked to me like something went wrong in updating an SDK and the cache was stuck on a wrong version (maybe with some parts old some new since it didn't work for you to downgrade) and never properly got invalidated. But that's a complete shot in the dark based on the behaviour.
Regardless, happy if it works now :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.