After upgrading to macOS Ventura 13.3.1 and being forced to install the new Xcode 14.3, all my UE projects started to produce the following error during build:
NameTypes.h:536:10: error: use of bitwise ‘&’ with boolean operands [-Werror,-Wbitwise-instead-of-logical]
The solution to this problem is two part:
First, downgrade Xcode 14.3 to Xcode 13.4.1;
Second, edit the project’s *.target.cs to disable the compiler flag -Wunused-but-set-variable;
Finally, you can open Xcode 13.4.1 using the cmd-line by running:
open /Applications/Xcode13.4.1.app/Contents/MacOS/Xcode
Since its annoying to have to use the previous command every time you want to open this version of Xcode, it is possible to set it as the default version using the script shared on this answer;
Step 2: edit the project’s *.target.cs files
At this point, building UE projects that have custom C++ code will generate the following error:
Material.h:1279:26: error: variable 'LayerNames' set but not used [-Werror,-Wunused-but-set-variable]
To solve this issue, simply edit both Source/*.Target.cs files and add these lines:
// fix error: "variable 'LayerNames' set but not used"
bOverrideBuildEnvironment = true;
AdditionalCompilerArguments = "-Wno-unused-but-set-variable";
Hi there. Many thanks for sharing this solution, especially in such a nice understandable way. Do you know if this would still work, since we are forced to build with iOS SDK 16 or newer? I haven’t been able to use iOS SDK 16 with Xcode 13 in the past.
Edit: In the meantime I was able to fix on of the other issues:
NameTypes.h:536:10: error: use of bitwise ‘&’ with boolean operands [-Werror,-Wbitwise-instead-of-logical]
You can simply replace the single & with && and | with || in the source files that produce those errors. After that I was able to build with Xcode 14.3 in 4.27
After a long time, I needed to build a project on iOS. My project was going great on macOS BigSur and XCode 12.5 and I deployed it perfectly on iPhone 7. When trying to upload the Shipping version of the game to Transporter, he wrote:
ERROR ITMS-90725: "SDK version issue. This app was built with the iOS 14.5 SDK. All iOS and iPad OS apps submitted to the App Store must be built with the iOS 16.1 SDK or later, included in Xcode 14.1 or later.
I upgraded MacOS to the latest available version Ventura 13.4 and installed XCode 14.3.
I build my project on Windows 10 using a remote Mac build (RSync) using a ready-made build of the 4.27.2 engine from Epic Game Launcher. I was looking for workarounds so as not to use the source files of the engine.
In the *.cs project files, I added:
YourGame.Target.cs after ExtraModuleNames.Add(“YourGame”);