Deprecation warnings on macOS 14.0

I’m getting the following deprecation warning in juce_mac_Windowing.mm:

[{
	"resource": "<my_project>/JUCE/modules/juce_gui_basics/native/juce_Windowing_mac.mm",
	"owner": "cmake-build-diags",
	"severity": 8,
	"message": "'CGWindowListCreateImage' is deprecated: first deprecated in macOS 14.0 - This API is deprecated. Please use ScreenCaptureKit's captureScreenshot APIs instead. [-Werror,-Wdeprecated-declarations]",
	"source": "GCC",
	"startLineNumber": 513,
	"startColumn": 33,
	"endLineNumber": 513,
	"endColumn": 1000,
	"relatedInformation": [
		{
			"startLineNumber": 266,
			"startColumn": 33,
			"endLineNumber": 266,
			"endColumn": 1000,
			"message": "'CGWindowListCreateImage' has been explicitly marked deprecated here",
			"resource": "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGWindow.h"
		}
	]
}]

This is on the Senoma beta using the latest tip of the develop branch of JUCE.

I can simply turn of -Werror for now and ignore the warning, but this will presumably need to be addressed before Senoma is fully released?

1 Like

Wow, the macOS 14.0 SDK really messed things up for me - I couldn’t even build juceaide due to the above deprecations! Ended up having to rename /Library/Developer/CommandLineTools/SDKs/MacOSX.14.0.sdk/ to force CMake to use the macOS 13 SDK instead as, for some reason, it wouldn’t respect the CMAKE_OSX_SYSROOT option.

1 Like

Thanks for reporting, we should have some fixes for the deprecations out shortly.

Linking this related post for completeness:

1 Like

Deprecation warnings should now be resolved on Sonoma:

We don’t have Sonoma on our CI yet (we’ll probably wait for the stable release first) so it’s possible I missed some bits - let me know if you find anything else that doesn’t build cleanly on Sonoma.

2 Likes

Yeah that appears to be working well!

I’m still getting this warning so not 100% unblocked, but can at least work around that one easier :slight_smile: