'Can I use UnrealEngine with C++ on Mac without Xcode

I am new to Unreal Engine as well as game development. I am using mac (since this laptop is not my personal usage, I have a limitation of using any application on AppStore) and can't install Xcode.

I'm interested in building Unreal, but whenever I open a .uproject, I got this error that says

SomeGame could not be compiled. Try rebuilding from source manually.

I also tried create a new project inside Unreal with C++ and got this error messages

An error occurred while trying to generate project files.
Running Mono...

Found mono via known Mono.framework path
Running installed mono, version:  Mono JIT compiler version 6.8.0.123 (2019-10/1d0d939dc30 Thu Mar 12 23:19:08 EDT 2020)
/Users/Shared/Epic Games/UE_4.22/Engine /Users/Shared/Epic Games/UE_4.22/Engine/Binaries/Mac
Discovering modules, targets and source code for project...
Triggered an exception while looking for SDK directory in Xcode.app
System.IO.DirectoryNotFoundException: Could not find a part of the path '/Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs'.
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult].CreateDirectoryHandle (System.String path, System.Boolean ignoreNotFound) [0x00032] in <f9d1b832704f410aa8ec771f4fe80552>:0 
  at System.IO.Enumeration.FileSystemEnumerator`1[TResult]..ctor (System.String directory, System.IO.EnumerationOptions options) [0x00048] in <f9d1b832704f410aa8ec771f4fe80552>:0 
  at System.IO.Enumeration.FileSystemEnumerable`1+DelegateEnumerator[TResult]..ctor (System.IO.Enumeration.FileSystemEnumerable`1[TResult] enumerable) [0x00000] in <f9d1b832704f410aa8ec771f4fe80552>:0 
  at System.IO.Enumeration.FileSystemEnumerable`1[TResult]..ctor (System.String directory, System.IO.Enumeration.FileSystemEnumerable`1+FindTransform[TResult] transform, System.IO.EnumerationOptions options) [0x00042] in <f9d1b832704f410aa8ec771f4fe80552>:0 
  at System.IO.Enumeration.FileSystemEnumerableFactory.UserDirectories (System.String directory, System.String expression, System.IO.EnumerationOptions options) [0x00014] in <f9d1b832704f410aa8ec771f4fe80552>:0 
  at System.IO.Directory.InternalEnumeratePaths (System.String path, System.String searchPattern, System.IO.SearchTarget searchTarget, System.IO.EnumerationOptions options) [0x00045] in <f9d1b832704f410aa8ec771f4fe80552>:0 
  at System.IO.Directory.GetDirectories (System.String path, System.String searchPattern, System.IO.EnumerationOptions enumerationOptions) [0x00000] in <f9d1b832704f410aa8ec771f4fe80552>:0 
  at System.IO.Directory.GetDirectories (System.String path) [0x0000b] in <f9d1b832704f410aa8ec771f4fe80552>:0 
  at UnrealBuildTool.AppleToolChainSettings.SelectSDK (System.String BaseSDKDir, System.String OSPrefix, System.String& PlatformSDKVersion, System.Boolean bVerbose) [0x00018] in <82101b97204c4edeb4347f6c33d7ef62>:0
ERROR: Invalid SDK MacOSX.sdk, not found in /Library/Developer/CommandLineTools/Platforms/MacOSX.platform/Developer/SDKs

I already install CLion as well as Visual Code with running g++/gcc on my terminal. I also install Mono https://www.mono-project.com/. I also tried installing Command Line Tools from https://developer.apple.com/download/more/

Nothing works out for me, now I'm start to doubt that I can do any Unreal development without Xcode, is it true? And if not, can someone help me how to do it?

Thanks.



Solution 1:[1]

Building from source requires Visual Studio (on Win) or XCode (on MacOS), there's no practical way around it. UE is a huge piece of software. I presume it's technically possible to recreate the entire project in another IDE and build it successfully, but in practice - definitely not possible. Swap your dev machine for something you can use, development of any kind requires admin access and being able to install all sorts of stuff.

edit: here's a guide for setting it up with VS Code https://medium.com/techiepedia/setting-up-unreal-engine-m1-macbook-for-c-game-development-eb40c12237d1

Probably doesn't solve your particular problem (still need to install VS code etc.), here for reference.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1