Change in header behavior in Xcode 11?

I have noticed a problem in several projects where Xcode will flag a C or Obj-C header file as not found, marking the #import or #include line with a red error flag and putting an error symbol in the status area up top. Sometimes cleaning the build folder will resolve this. Other times, the problem remains until I compile, after which it goes away. But then it might come back again later on while editing/coding even though I have done nothing to the header file in question.


I have seen this on old projects and projects that were started new with Xcode 11. I assume something changed in the way Xcode parses headers on the fly while doing live syntax checking, etc, and for some reason it's not finding the headers or it's erroneously showing them as missing. All of these headers are in the main source root folder of the projects (and for old projects, have been that way for years without issues).


Obviously the compiler finds the headers, otherwise compilation would fail.


Anybody else seen this or have suggestions?

Replies

I have seen this in two places:


1) In my own projects where I've got some embedded frameworks. I had a persistent problem in earlier versions of Xcode where one of my embedded framework header files would be flagged as an error because it couldn't be found. The error would invariably be in one specific place where it was included, but not the 43 other files where it was included. The error seemed to be triggered by indexing, syntax-building, or something. Any actual builds or archives would always build successfully. I haven't seen this error for a long time. I don't know if it was due to improvements in Xcode or improvements I've made to the frameworks.


2) I have seen a large number of obvious new developers complaining that they can't build the C++ template project. I can never reproduce the problem. These are new developers so they don't understand how it works. Their remediation is limited to reinstalling the operating system and Xcode. They aren't able to follow more detailed diagnostic instructions. I suspect that beta Xcode builds, command-line tools, and "ports" packages may be complicating their efforts.

I would love to follow some detailed diagnostic instructions if someone actually offered any. Do you have any suggestions


and for the record I didnt have any beta builds installed, command line tools or anything of that sort. I installed xcode and was presented with the issue. I have been looking for assitance but all ive ever come across is older developers belittling people who dont know the details of any application.