19

I'm using an old version of Cocos2d-iphone and need to come up with one last release before I completely reconfigure my app for Metal support. Until then, I'm trying to work through all the deprecated issues besides the OpenGL stuff. As it is, I have well over 400+ messages that say

"_____ is deprecated: first deprecated in iOS 12.0 - OpenGLES API deprecated. (Define GLES_SILENCE_DEPRECATION to silence these warnings)_

Where do I define this in my project? I tried putting it in the top of my global.h header as well as a few other places, but I can't seem to get rid of it.

Cœur
  • 37,241
  • 25
  • 195
  • 267
PWiggin
  • 956
  • 2
  • 12
  • 24

1 Answers1

41

Define it under Preprocessor Macros in Build Settings:

Build Settings

Cinder Biscuits
  • 4,880
  • 31
  • 51
  • The warnings remain. 'EAGLContext' is deprecated: first deprecated in iOS 12.0 - OpenGLES API deprecated. (Define GLES_SILENCE_DEPRECATION to silence these warnings) – Derek Pollard Jun 26 '20 at 13:28
  • 1
    You sure you're defining it under the right project level? I checked the SDK, it's still in there. – Cinder Biscuits Jun 27 '20 at 15:03
  • 1
    Oh no, it was in the wrong bit! I had put it in the 'Preprocessor Macros Not Used In Precompiled Headers' where something else was - it's and old project. Now I've got a findable/resolvable 28 warnings instead of 572. Phew. Thanks so much. – Derek Pollard Jun 28 '20 at 09:39
  • 3
    ftr you don't have to set `GLES_SILENCE_DEPRECATION=1`, simply adding `GLES_SILENCE_DEPRECATION` to the list works – bobobobo Dec 16 '20 at 22:17