Build errors packaging for iOS : UE 4.17.2 / Xcode 8.2.1

I have been experiencing a variety of errors trying to get an Unreal project started on Windows to compile for iOS on a Mac. Initially, I had the problems with Xcode 9 and 8.3 described in this post:

I followed the instructions in it using Xcode 8.2.1 and was successful in building the Xcode project. In UE, however, the packaging process fails, seeming to error out on references to UE classes. A small sampling of the errors:

/Source/<Project>/<Project>Pawn.h:6:30: error: base class has incomplete type

  • extends APawn

/Source/<Project>/AssetLibrary.h:36:30: error: expected class name

  • referencing UBlueprintFunctionLibrary

/Source/Roomored/AssetLibrary.h:38:2: error: incomplete type 'UTextProperty' named in nested name specifier

These would seem to indicate that the project is unable to find UE classes for some reason, which makes me think there’s a problem in either pre-compiled headers or something else related to Xcode/clang.

So it turns out that this was a problem with the fact that on Windows it compiles in such a way that it doesn’t need any engine includes - probably a Visual Studio thing. On Mac with Xcode they are required. I just had to hunt down the engine classes being used and include the headers. Hopefully this is helpful to someone in the future.

Hi Chris,

I am glad to hear that you were able to resolve this. By any , was your project originally created prior to 4.15? We switched the Engine to use an “Include What You Use” format in 4.15, and prior to that I don’t believe individual Engine header files were included in classes due to them being included by header files that included large numbers of Engine header files, some of which may not actually have been used by the project. When I created a new project in 4.17 (on Windows) and added new Pawn and BlueprintFunctionLibrary code classes, the appropriate Pawn.h and BlueprintFunctionLibrary.h files were included in the header files for the new class.

Yes, I’m pretty sure it was. It’s great to know the Include What You Use feature is now available. Thanks for the heads-up!