Can't build the project from XCode on iOS (UE 4.26.1)

After updating from UE 4.26.0 to 4.26.1, I am not able to build & run the UE4 C++ project on the iOS device via XCode when selecting “Development” build configuration - it fails on the XcodeBuild.sh step (you can find here complete log):

VERBOSE: Compile module: Launch
ERROR: Missing precompiled manifest for 'Launch'. This module was most likely not flagged for being included in a precompiled build - set 'PrecompileForTargets = PrecompileTargetsType.Any;' in Launch.build.cs to override.

Here are my specs:

  • macOS version: 10.15.5
  • XCode: 11.6
  • UE 4.26.1 downloaded from EGL

NOTE: it fails even with the simplest project created from the template.

1 Like

I’m hitting this as well :frowning:

Hi guys,

I tracked down the problem, we recently added multiple architecture support for Apple Silicon Macs and it looks like this changes the path expected for the binary. The solution is to add the following code to Engine/Source/Programs/UnrealBuildTool/Platform/IOS/UEBuildIOS.cs inside the class IOSPlatform section, eg line 683 to make it ignore the architecture string for iOS:

public override string GetFolderNameForArchitecture(string Architecture)
{
	return "";
}

I then needed to rebuild UnrealBuildTool. The easiest way to do that is to run the following commands:

cd "Wherever/Epic Games/UE_4.26/Engine"
rm -rf Source/Programs/DotNETCommon/DotNETUtilities/obj
rm -rf Source/Programs/UnrealBuildTool/obj
sh Build/BatchFiles/Mac/GenerateProjectFiles.sh

GenerateProjectFiles will give an error needing a project path, but UnrealBuildTool has been rebuilt and that’s all we needed. After making this change I was able to build in Xcode after doing Product | Clean.

I’ve created ticket UE-112581 to address this bug in 4.27.

An alternative workaround is use the 4.26.1 source tree from Github or Perforce and then run GenerateProjectFiles.command to make an Xcode workspace. The source tree is intended to be built from scratch with Xcode and is probably the better option for debugging crashes in Engine code.

You also need to add one more function to UEBuildIOS.cs. This issue doesn’t just affect launcher builds and is also fixed in the upcoming 4.26.2.

public override bool RequiresArchitectureSuffix()
{
	return false;
}