Xcode 4.5.2 fatal error: precompiled header was changed

I make changes in my project all day, create and run the project, and now, when I try to build, I get this error:

fatal error: file /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h' has been modified since the precompiled header was built 
  • When I try to clean a project by going to Product -> Clean , it refuses to clean and gives me the same error.
  • I deleted the .build directory from the project folder, forcing him to rebuild the project and did not fix anything.
  • I deleted the folder ~/Library/Developer/Xcode/DerivedData/PROJECT_NAME_HERE , also did not help.
  • I tried closing and reopening Xcode, which didn't help either.

I checked the Foundation.h header file and it shows the Date Modified on October 30th along with any other file in the Headers folder, so it really hasn't been changed.

Other projects that I create do not have this error.

I donโ€™t get it here. Xcode seems to be lying to me.

0
source share
1 answer

Well, I did not find a clean solution to this problem, but it was still a solution. The project was under source control, so I submitted my changes to the repository, disconnected the entire project from my hard drive and removed it from the repository and fixed the problem.

My assumption is some parameter in the project or data stored next to the project that has never been sent to the repository, so deleting and updating the project from the repository fixes the problem. It is odd that removing DerivedData and .build from within the project did not .build problem, so this should be a setting saved elsewhere.

+1
source

Source: https://habr.com/ru/post/1435435/


All Articles