Why can't UE4 detect Xcode on my Mac?

I have the latest Xcode version installed (5.1), but it seems UE4 can’t find it. I can’t add any code to the project neither use a code template (“No compiler was found. In order to use a C++ template, you must first install Xcode”).

Any idea how to fix this?

aha, got it! Yeah, I renamed this to Xcode 5.1 ( so that I can better track multiple Xcode versions).
Thanks!

Our check for Xcode presence is very simple - we just check if /Applications/Xcode.app folder exists. Maybe you have Xcode installed somewhere else or renamed?

1 Like

How about using xcode-select -p to find out the path for the currently selected Xcode instead of hard wiring this to /Applications/Xcode.app?

My xcode was renamed to “Xcode 5.app”. Renamed it to “Xcode.app”, restarted UE, but didnt work

Hello Rakesh Malik,

Can you provide me with the following information?

  • What operating system are you using?
  • What version of Xcode are you attempting to use?
  • Are you using Unreal Engine 4.9?
  • Did your version of the engine come from the Epic Games Launcher or is it a version you downloaded from GitHub?

Hi Rakesh Malik,

Are you still experiencing these issues? If so, please provide more information in the form of answering my previous questions. In the meantime, I’ll be setting this back to resolved for tracking purposes.

Have a nice day!

hi ,

details are: OS X El Capitan 10.11.6,
XCode 7.0,
Unreal Engine 4.14,
from Epic Games Launcher

the issue was fixed previously, dont remember how. didnt notice your reply. recently upgraded to 4.14 and got the issue again

issue is only happening in upgraded project. not newly created projects

Thank you for that information. Are you getting the same error that the original poster was getting or are you getting something different? When does the error occur? Is it when you try to open the .xworkspace file in XCode or when you try to open the project itself?

I’m running into this problem now with El Capitan and Xcode 8.2.1

I’ve tried renaming Xcode from Xcode.app to Xcode 8.app but It UE 4.13.3 does not seem to be able to find Xcode.

I am having the same issue but now understand why. I have Xcode installed on a different drive, any way to tell the editor the new current path?

Same issue as @Rakesh Malik 's here in 4.16.3 and Xcode 8.3.3
how to fix ?

@ColdSteel48 I really don’t remember anymore how I fixed it… sorry that I couldn’t be of help :frowning:

I’m not sure if it’s how Rakesh fixed the issue, but taking a page from Silkentrance, I used xcode-select -p to determine that my default directory was not /Applications/Xcode.app but something like Library/Developer/CommandLineTools. I then used xcode-select --reset to revert back to default, which realigned my default directory to /Applications/Xcode.app/Contents/Developer which, after restarting the UE4, worked perfectly. Hope this helps.

UPDATE:

This answer from JohnnyDStar fixed my issue: "
I’m not sure if it’s how Rakesh fixed the issue, but taking a page from Silkentrance, I used xcode-select -p to determine that my default directory was not /Applications/Xcode.app but something like Library/Developer/CommandLineTools. I then used xcode-select --reset to revert back to default, which realigned my default directory to /Applications/Xcode.app/Contents/Developer which, after restarting the UE4, worked perfectly. Hope this helps."

So, use these two calls in a Terminal Window on Mac OS X:

xcode-select -p (shows current Xcode location path, in case there is more than one)

xcode-select --reset (resets path to default location of “/Applications/Xcode.app/”)

xcode-select -p (confirms new location)

Thanks, JohnnyDStar

  • Jimbo

details:
Mac OS X (10.14.5 (Mojave)
Xcode v10.3 (10GB)
Unreal 4.22.3


This note comes up in the lower right-hand corner of the screen:

Xcode was not detected on this Mac.
Metal shader comilation will fall back to runtime comiled text shaders, which are slower.

I have XCode 10.3, the latest installed in /Applications/Xcode.app/

What else do I need to do?

I’m having the same issue. Unreal comes up with Xcode was not detected on this Mac
Metal Shader compilation will fall back to runtime compiled text shaders, which are slower.
Please install latest version of Xcode for best performance
and make sure it’s set as default using xcode-select tool.

Not sure how I do that last bit.
Would love any assistance to understand what might be going wrong.

  • Jimbo

details:
Mac OS X (10.14.5 (Mojave)
Xcode v10.3 (10GB)
Unreal 4.22.3


On Unreal Launch, this note comes up in the lower right-hand corner of the screen:

I’m having the same issue. Unreal comes up with Xcode was not detected on this Mac
Metal Shader compilation will fall back to runtime compiled text shaders, which are slower.
Please install latest version of Xcode for best performance
and make sure it’s set as default using xcode-select tool.

Not sure how I do that last bit.
Would love any assistance to understand what might be going wrong.

I do not see any Xcode env variables in the terminal, so no help there.

Cheers.

  • Jimbo

BTW, my Xcode is in /Applicationa/Xcode.app/

I have this same issue, tried all solutions above but didn’t work.

My path from xcode-select -p shows (/Applications/Xcode.app/Contents/Developer)

and indeed when I go to that path there xCode is there.

I am running MacOS Catalina 10.15.6, unreal engine 4.17.2-3658906 installed from epic games launcher.

The message I get is… Xcode installed on this Mac cannot be used for Metal shader compilation. Falling back to runtime compiled text shaders, which are slower. Please install xCode 8.3.x for best performance.

I do have homebrew installed on my system in case that is affecting it somehow as some posts have said but I’m not sure how it would or how to fix it if so.

Any help is appreciated.

I have this same issue, tried all solutions above but didn’t work.

My path from xcode-select -p shows (/Applications/Xcode.app/Contents/Developer)

and indeed when I go to that path there xCode is there.

I am running MacOS Catalina 10.15.6, unreal engine 4.17.2-3658906 installed from epic games launcher.

The message I get is… Xcode installed on this Mac cannot be used for Metal shader compilation. Falling back to runtime compiled text shaders, which are slower. Please install xCode 8.3.x for best performance.

I do have homebrew installed on my system in case that is affecting it somehow as some posts have said but I’m not sure how it would or how to fix it if so.

Any help is appreciated.