OpenGLES is deprecated and is not available when building for Mac Catalyst.

I have an app written in Objective-C. I tried to import it to Mac Catalyst and when i build it for "My Mac" i get this error:


OpenGLES is deprecated and is not available when building for Mac Catalyst.


How can i fix it?


Best regards.

Answered by DTS Engineer in 396983022

There are a few possibilities here:

  • Check in your project's build settings to see if OpenGLES is specified anywhere.
  • Look in the Build Phases to see if it is in the Link Binaries build phase.
  • Check with the vendors of any third party libraries you use. None of them should have OpenGLES, since Mac Catalyst is a new platform and the vendor should get this error when building their libraries too, but I mention it just in case.


If nothing else turns up, you can always use the grep command line tool as a course way of trying to find any reference to OpenGLES:

% grep -R -B2 -A2 OpenGL <YourProjectFolderPath>

Metal is the modern graphics technology for Apple platforms and replaces previous graphics technologies like OpenGLES. This page is a good starting point for learning about it.

Hi,


the problem is that i didn't use any OpenGLES code into my project so actually i don't know where should i put my hands on 🤔

Thanks for the clarification. The build log should give you some context, such as highlighting the specific target that the linker discovered OpenGLES in. In some case, there is additional text to the message describing where OpenGLES is referenced. Are you able to copy the specific part of the build log with this message by clicking on it, copying it, and sharing it here? For example, this variation of the log shows an #import from a specific file.


Showing All Messages
/tmp/Test/Test/ViewController.m:10:9: OpenGLES is deprecated and is not available when building for Mac Catalyst. Consider migrating to Metal instead, or use `#if !TARGET_OS_MACCATALYST` to conditionally import this framework, first importing TargetConditionals.h if necessary.

Thanks for your explanation.

If i click on the error i get this:

ld: framework not found OpenGLES

clang: error: linker command failed with exit code 1 (use -v to see invocation)

OpenGL ES has never been supported on Mac OS. With OpenGL being deprecated, I guess Apple did not want to spend time providing runtime support for OpenGL ES on top of Mac OS.


Its a big bother porting your app from OpenGL to Metal. At least they are similar in many ways conceptually.


I don't know what type of app you have, but if you are using a 3rd party engine, they might have done most of the conversion for you.


Otherwise, if you are not strong in Computer Graphics, this could be a real problem.

Accepted Answer

There are a few possibilities here:

  • Check in your project's build settings to see if OpenGLES is specified anywhere.
  • Look in the Build Phases to see if it is in the Link Binaries build phase.
  • Check with the vendors of any third party libraries you use. None of them should have OpenGLES, since Mac Catalyst is a new platform and the vendor should get this error when building their libraries too, but I mention it just in case.


If nothing else turns up, you can always use the grep command line tool as a course way of trying to find any reference to OpenGLES:

% grep -R -B2 -A2 OpenGL <YourProjectFolderPath>

I found that one of my third party library (VLCKit) use OpenGLES. That's why i can't build for Mac Catalyst. Thanks for your help! 🙂

OpenGLES is deprecated and is not available when building for Mac Catalyst.
 
 
Q