Building an iPhone app, using:
I have started getting the following error
Clean
ways are not working for me, eventually I solved this issue by reinstall XCode.
Remove the contents for the Simulator by iOS Simulator > Reset Content and Settings... and hit Rest. This will remove any existing pre-compiled instances of the headers and resources. This worked for me
Deleting the DerivedData folder did not work for me when Archiving.
I had to look at Build Settings - Build Locations - Precompiled Header Cache Path and delete that folder.
For me that was:
/var/folders/_w/t0mj70hd1439tqgxff7_mtt00000gn/C/com.apple.Xcode.501/SharedPrecompiledHeaders
I was able to fix it in a much easier way, by simply choosing Product > Clean, then Product > Build from the Xcode menubar.
I thought I would add a separate answer rather than a comment to Cryptognome's answer, because it is in fact a different solution when the issue comes from running xcodebuild
. Like Cryptognome, I had the error come up with the command-line tool xcodebuild
. As an alternative to manually going into the /var
subfolders, I found that I could set my own cache for the shared PCH, which you can do by setting the environment variable SHARED_PRECOMPS_DIR
, e.g as follows
xcodebuild -target Foo -configuration Release SHARED_PRECOMPS_DIR=/tmp/foo/SharedPCH
This way, I never get the error in automatic builds.
Note in the above command, I would also typically set the OBJROOT
and SYMROOT
env var to build also in /tmp. At the end, I clean things up.
I tried above all but no use. Finally I deleted Xcode and re installed again. Now it is working fine..
Xcode->delete->install again
It might help some one...