Here’s a little explanation on how UE4 Xcode projects work.
As you might’ve noticed, we don’t use Xcode to compile/link the engine, but rather External Build Tool targets that build the engine using our UnrealBuildTool. The downside is that at the moment Xcode is not able to fully compile many of our source code files during indexing, as it ignores important build settings for External Build Tool targets, like preprocessor definitions or header search paths. It even dons’t care about source code files being added to the target.
That’s where UE4XcodeHelper target comes in. I added it so that we can give Xcode at least basic info about our code. Not enough to fully compile the source code during indexing, as I mentioned, but enough to know which file to index in a first place and where to find most of headers. For me it’s been working quite well, but I have to confess that mostly tested it with a full engine code. Maybe something is currently broken in projects stored outside of UE4 source code tree You’re the first one reporting this, so let me do some tests Monday.
One question, though. Are you able to successfully build your game target despite this Engine.h error? If yes, that means that the problem is limited to Xcode’s indexing. If not, that’s another story and I will need more details.