FR: Please use @available for checking if features exist on mac

Please use @available for checking if features exist on mac. I would like to enable -Wpartial-availability to catch the use of Objective-C functions that don’t exist on all macOS versions that I deploy on.

However, JUCE uses the old school way to check if features exist, so it throws warnings when I compile. Please use @available which has been available since Xcode 9.

And then make the following change:

             if ([window respondsToSelector: @selector (setRestorable:)])
                 [window setRestorable: NO];
 
-           #if defined (MAC_OS_X_VERSION_10_13) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_13)
-            if ([window respondsToSelector: @selector (setTabbingMode:)])
-                [window setTabbingMode: NSWindowTabbingModeDisallowed];
-           #endif
-
+            if (@available(macOS 10.12, *)) {
+                [window setTabbingMode: NSWindowTabbingModeDisallowed];
+            }
+                       

Being hit by this right now, it’s the sole reason why we can’t enable “treat warnings as errors” in certain projects