Code Completion XCode

I found the simpler solution. It is not perfect, but may be useful.
As you know, for auto-completion, Xcode needs to know the definition of the classes.
Header files of the engine are included in /Users/Share/UnrealEngine/4.0/Engine/Sources.
Thus, go to build settings of “UE4XcodeHelper”. In “Header Search Paths”, you need to add

/Users/Shared/UnrealEngine/4.0/Engine/Source/Runtime/Engine/Classes [non-recursive]
/Users/Shared/UnrealEngine/4.0/Engine/Source/Runtime/Engine/Public [non-recursive]
/Users/leehyeonwoo/MyDev/Codes/Github/UnrealEngine/Engine/Intermediate/Build/Mac/Inc/Engine [non-recursive]
/Users/Shared/UnrealEngine/4.0/Engine/Source/Runtime/Core/Public [recursive]

This will index basic classes.

If you want to index full classes, you can set
/Users/Shared/UnrealEngine/4.0/Engine/Source/Runtime/ [recursive]

but, this will be very, very slow. :frowning:
As I mentioned, it’s not perfect. I’ll wait mike’s solution.

Worked for me.

Thanks it works. But indexing even with first way very, very long now.

Hello,

I just started using UE4 and also could not get the Xcode auto completion working on some of my projects. I am currently using UE 4.4.3 (the source code version) and Xcode 6.0.1. The problem seems to be related to spaces in path to the Engine source code. I initially had the Engine code under “Unreal Projects” and auto completion did not work at all on any projects created using UE under “Unreal Projects”. I move the code to “/Users/Shared/UnrealSource”, recompiled and now autocompletion is working fine (after indexing is completed). Looking at the project settings I can see that there are still some paths with spaces which are not correctly interpreted by Xcode.

Maybe there are other new users of UE4 with a similar problem.

I’m sorry to dig up this corpse thread, but after almost 2 years I’m still experiencing Xcode not being able to index any project. Is there any news on this side?

The default folder of my first time installed UE4 (4.8 probably) was “Users/Shared/UnrealEngine/UE_4.XX”. Code completion was fine up to now. The last good setup for me was ue4.14.3 and xcode8.1.

However, when I installed ue4.15.0 and find that it didn’t run on my macbook pro 2011 anymore because of no apple metal support. I got no choice but rolling back to ue4.14.3 . This time epic games launcher set the default installed folder to “Users/Shared/Epic Games/UE_4.14”. And then I found the code completion was broken on xcode.

I spent some time trying different version of xcode and ue4 combination and couldn’t fix the problem. Yesterday, I got the right solution finally. It was the problem of default installed path. If you got space(s) in that installed path, you would screwed up. I just installed it back to “Users/Shared/UnrealEngine/UE_4.14” and everything fine again!

PS. I got no problem with spaces on the Project folder path. The problem was on the UE4 installed path.

You are right, there’s something wrong with spaces in folders. Somewhere that string isn’t being escaped thus leading to this behavior. The same happens for all the different autocomplete extensions for VSCode apparently.

How do you change the default folder from which the launcher opens Unreal from?

I bet it’s somewhere in the launcher’s ini files but I do not know for sure. I just removed and installed it again in the new folder

This may be the same thing: Auto complete not working in Xcode - suspected due to space in UE install path - Platform & Builds - Epic Developer Community Forums

I had to fix the Header Search Paths and User Header Search Paths in both the UE4 Xcode project and my own Xcode project, “BuildingEscape”:

I made a symbolic link from “EpicGames” to “Epic Games” as advised here: Code Completion XCode - Programming & Scripting - Epic Developer Community Forums

I didn’t want to fix every entry in the search paths, so I only fixed the top level entry, and set it to recursive:

Lastly, I had to force Xcode to reindex the headers by following these instructions:
https://blog.kida.io/how-to-reindex-your-xcode-4-5-projects/