Unreal couldn’t compile new C++ project

Hello All
I’m using M1 Mac and have a problem with Unreal (5.0.3) after I installed Xcode14.
Unreal couldn’t compile new C++ project when I try to start new c++ project (eg. Third person template), the message is like

The project could not be compiled. Would you like to open it in Xcode?
Log file: /Users/myname/Library/Application Support/Epic/UnrealBuildTool/Log.txt
Creating makefile for MyProjectjkljklEditor (no existing makefile)
ERROR: Platform Mac is not a valid platform to build. Check that the SDK is installed properly.

I tried it with Unreal(4.27.2) but same results. I also reinstalled Unreal and Xcode but I couldn’t solve it.
The corresponding log file is

Log started at 09/15/2022 05:37:13 (2022-09-14T20:37:13Z)
No config file at /Users/myname/Unreal Engine/UnrealBuildTool/BuildConfiguration.xml
Configuration will be read from:
/Users/myname/.config/Unreal Engine/UnrealBuildTool/BuildConfiguration.xml
Note: Android toolchain NDK r21b recommended
Command line: “/Users/Shared/Epic Games/UE_5.0/Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool.dll” Development Mac -Project=/Users/myname/Documents/Projects/Unreal_Projects/Handbook/MyProje/MyProje.uproject -TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE
Log file: /Users/myname/Library/Application Support/Epic/UnrealBuildTool/Log.txt
Deleting old log file: /Users/myname/Library/Application Support/Epic/UnrealBuildTool/Log-backup-2022.09.13-15.22.48.txt
Skipping /Users/Shared/Epic Games/UE_5.0/Engine/Intermediate/Build/BuildRules/UE5Rules.dll: File is installed
Skipping /Users/Shared/Epic Games/UE_5.0/Engine/Intermediate/Build/BuildRules/UE5ProgramRules.dll: File is installed
Creating makefile for MyProjeEditor (no existing makefile)
ERROR: Platform Mac is not a valid platform to build. Check that the SDK is installed properly.
BuildException: Platform Mac is not a valid platform to build. Check that the SDK is installed properly.
at UnrealBuildTool.UEBuildTarget.Create(TargetDescriptor Descriptor, Boolean bSkipRulesCompile, Boolean bForceRulesCompile, Boolean bUsePrecompiled) in /Users/build/Build/++UE5/Sync/Engine/Source/Programs/UnrealBuildTool/Configuration/UEBuildTarget.cs:line 703
at UnrealBuildTool.BuildMode.CreateMakefile(BuildConfiguration BuildConfiguration, TargetDescriptor TargetDescriptor, ISourceFileWorkingSet WorkingSet) in /Users/build/Build/++UE5/Sync/Engine/Source/Programs/UnrealBuildTool/Modes/BuildMode.cs:line 726
at UnrealBuildTool.BuildMode.Build(List`1 TargetDescriptors, BuildConfiguration BuildConfiguration, ISourceFileWorkingSet WorkingSet, BuildOptions Options, FileReference WriteOutdatedActionsFile, Boolean bSkipPreBuildTargets) in /Users/build/Build/++UE5/Sync/Engine/Source/Programs/UnrealBuildTool/Modes/BuildMode.cs:line 267
at UnrealBuildTool.BuildMode.Execute(CommandLineArguments Arguments) in /Users/build/Build/++UE5/Sync/Engine/Source/Programs/UnrealBuildTool/Modes/BuildMode.cs:line 237
at UnrealBuildTool.UnrealBuildTool.Main(String[] ArgumentsArray) in /Users/build/Build/++UE5/Sync/Engine/Source/Programs/UnrealBuildTool/UnrealBuildTool.cs:line 612
WriteFileIfChanged() wrote 0 changed files of 0 requested writes.
Timeline:
[ 0.000]
0.000
[ 2.389]

What could I try next?
Please someone help me
Thanks

3 Likes

I had the same problem. The only solution that I could make work was to download xcode13 from Apple’s developer site, unzip it, rename the app bundle from xcode to xcode13 before putting it into the app folder and then switching to the old xcode with

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

If you need to deploy to devices running the new OS you can almost certainly copy the device support files for iOS16 from the new xcode into the old one. I haven’t tried that this year but it’s worked in the past.

4 Likes

Hello GlennCorpes
Thank you so much.
I solved the problem and could save a lot of time :slight_smile:

1 Like

have any solution for the same problem, but for macOS ventura 13.2, which requires the xcode 14?

for UE 4.27.2:

this worked on macOS ventura, but make sure to delete (Intermediate,Binaries,DerivedDataCache) folders on your project root before opening the project

ps: I used Xcode 12 instead (I had it already downloaded)
sudo xcode-select -s /Applications/Xcode12.app/Contents/Developer