# Dealing with UE 4.27 build errors after upgrading to macOS Ventura 13.3.1

**URL:** <https://forums.unrealengine.com/t/dealing-with-ue-4-27-build-errors-after-upgrading-to-macos-ventura-13-3-1/1134042>\
**Category:** Platform & Builds\
**Tags:** clang, Macos, build, unreal-engine\
**Created:** [April 20, 2023, 1:11am UTC](https://forums.unrealengine.com/t/dealing-with-ue-4-27-build-errors-after-upgrading-to-macos-ventura-13-3-1/1134042 "2023-04-20T01:11:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![karlphillip](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@karlphillip](https://forums.unrealengine.com/u/karlphillip)\
**Post date:** [April 20, 2023, 1:11am UTC](https://forums.unrealengine.com/t/dealing-with-ue-4-27-build-errors-after-upgrading-to-macos-ventura-13-3-1/1134042/1 "2023-04-20T01:11:00Z")

</div>

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:

```auto
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`;

**Step 1: downgrade Xcode to 13.4.1**

This version can be downloaded from: [https://xcodereleases.com/](https://xcodereleases.com/)

- Once downloaded, go to your `Downloads` folder and double-click `Xcode_13.4.1.xip` to extract it to `Xcode.app`;
- When the extraction process finishes, open the Terminal and `cd` to your `Downloads` folder and rename `Xcode.app` to `Xcode13.4.1.app`;

```auto
cd ~/Downloads
mv Xcode.app Xcode13.4.1.app

```

- Next, move it into the _Applications_ folder;

```auto
mv ~/Downloads/Xcode13.4.1.app /Applications

```

- Make sure Xcode command line tools points to this older version of Xcode:

```auto
sudo xcode-select -s /Applications/Xcode13.4.1.app/Contents/Developer/

```

- Finally, you can open Xcode 13.4.1 using the cmd-line by running:

```auto
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](https://stackoverflow.com/a/74500488);

**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:

```auto
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:

```auto
// fix error: "variable 'LayerNames' set but not used"
bOverrideBuildEnvironment = true;
AdditionalCompilerArguments = "-Wno-unused-but-set-variable";

```

---

<div class="post-metadata">

**Author:** ![Thoeme](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Thoeme](https://forums.unrealengine.com/u/Thoeme)\
**Post date:** [April 28, 2023, 3:40pm UTC](https://forums.unrealengine.com/t/dealing-with-ue-4-27-build-errors-after-upgrading-to-macos-ventura-13-3-1/1134042/2 "2023-04-28T15:40:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Owl\_Snowy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Owl\_Snowy](https://forums.unrealengine.com/u/Owl_Snowy)\
**Post date:** [June 14, 2023, 3:45pm UTC](https://forums.unrealengine.com/t/dealing-with-ue-4-27-build-errors-after-upgrading-to-macos-ventura-13-3-1/1134042/4 "2023-06-14T15:45:28Z")

</div>

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”);_

> // For XCode 14.3  
> bOverrideBuildEnvironment = true;  
> AdditionalCompilerArguments = " -Wno-bitwise-instead-of-logical -Wno-unused-but-set-variable";

_YourGameEditor.Target.cs_  
_after ExtraModuleNames.Add(“YourGame”);_

> // For XCode 14.3  
> bOverrideBuildEnvironment = true;

Click Refresh Solution and Build Project

My project got together and **Transporter** accepted it

---

<div class="post-metadata">

**Author:** ![CppGod](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CppGod](https://forums.unrealengine.com/u/CppGod)\
**Post date:** [August 6, 2023, 11:48am UTC](https://forums.unrealengine.com/t/dealing-with-ue-4-27-build-errors-after-upgrading-to-macos-ventura-13-3-1/1134042/6 "2023-08-06T11:48:18Z")

</div>

Thank you a lot man, you save my life
