On May 19, 2015, at 1:47 PM, Jens Alfke wrote:
On May 19, 2015, at 10:23 AM, Alex Zavatone <
email@hidden> wrote:
If this happens to any of you, what worked for me was to dirty the .pch (I pressed return before the line I that had the app's constants) and rebuilt.
I get bogus build errors from Xcode on a not-quite-daily basis. Usually that none of my headers can be found, sometimes lower-level errors complaining about missing or invalid internal intermediate files. Now I just reflexively hit Cmd-Shift-Opt-K (Product > Clean Build Folder) and that almost always fixes it. In extreme cases I also have to quit and relaunch Xcode.
Yeah, that's why the heart attack. Command shift K didn't result in a recompile of the .pch. I had to manually dirty the file by inserting a return so that it would recompile and all the errors would magically go away.
I tried command Shift K, I tried quitting and relaunching Xcode, I tried stepping back in each of my uncommitted classes in Git. Then, before getting too destructive, I thought "what if I edit the .pch which is allegedly importing the Defaults.h file for the whole project and then see if it rebuilds and all my errors go away just like magic."
That's what worked.
I'll have to print out these instructions and put them up on the wall so I don't have reoccurring heart attacks every 2 weeks when this happens again.
I WISH command shift K worked in this case, but for some reason, the rules governing recompiling the .pch appear different.
I already have the medal with oak leaf clusters for "Surviving Manual Code Signing and Provisioning", I wonder what medal will be granted for surviving this?
Xcode is BY FAR the flakiest (and crashiest) app I use, and has been since 4.0 or so.
—Jens