Warnings since 6.1.2 - graphicsPort, graphicsContextWithGraphicsPort, NSFileHandlingPanelOKButton

As stated in the subject, these warnings do not appear when compiling with 6.1.2 but do when using develop.

System:

  • macOS: 10.15.7
  • JUCE: develop (commit 462c3a8d)

graphicsPort

In file included from /Users/me/Documents/SourceControl/test/JUCE/modules/juce_gui_basics/juce_gui_basics.cpp:297:
/Users/me/Documents/SourceControl/test//JUCE/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm:860:71: error: 
      'graphicsPort' is deprecated: first deprecated in macOS 10.14 [-Werror,-Wdeprecated-declarations]
            return (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort];

graphicsContextWithGraphicsPort

In file included from /Users/me/Documents/SourceControl/test/JUCE/modules/juce_gui_basics/juce_gui_basics.cpp:298:
/Users/me/Documents/SourceControl/test/JUCE/modules/juce_gui_basics/native/juce_mac_Windowing.mm:651:66: error: 
      'graphicsContextWithGraphicsPort:flipped:' is deprecated: first deprecated in macOS 10.14
      [-Werror,-Wdeprecated-declarations]
        [NSGraphicsContext setCurrentContext: [NSGraphicsContext graphicsContextWithGraphicsPort: juce_getImageContext (image)

NSFileHandlingPanelOKButton

/Users/me/Documents/SourceControl/test/JUCE/modules/juce_gui_basics/native/juce_mac_FileChooser.mm:227:20: error: 
      'NSFileHandlingPanelOKButton' is deprecated: first deprecated in macOS 10.13 [-Werror,-Wdeprecated-declarations]
            return NSFileHandlingPanelOKButton;

What are your base SDK and deployment target settings in Xcode, and which version of Xcode are you using? Are you able to reproduce this with one of the unmodified JUCE examples? I’m not seeing any deprecation warnings locally, nor are they being flagged up on our CI so I’m having some issues tracking this down.

Hi Ed,

Ok, for now…

xcode is v12.1
SDK is 10.15
Command Line Tools is set to Xcode 12.1 (12A7403)
macOS Deployment Target is macOS 10.15

I will attempt one of the examples later today and get back to you.

Thanks, I can reproduce these now - it’s the deployment target setting that’s triggering it. I’ll push a fix shortly.

1 Like