The current minimum-supported Xcode (10.1) includes the macOS 10.14.1 SDK, so APIs from macOS 10.14 will always be available.v7.0.9
@@ -41,7 +41,7 @@ | |||||
#import <MobileCoreServices/MobileCoreServices.h> | #import <MobileCoreServices/MobileCoreServices.h> | ||||
#include <sys/fcntl.h> | #include <sys/fcntl.h> | ||||
#else | #else | ||||
#if JUCE_MODULE_AVAILABLE_juce_opengl && defined (MAC_OS_X_VERSION_10_14) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14 | |||||
#if JUCE_MODULE_AVAILABLE_juce_opengl | |||||
#define GL_SILENCE_DEPRECATION 1 | #define GL_SILENCE_DEPRECATION 1 | ||||
#endif | #endif | ||||
@@ -41,12 +41,10 @@ public: | |||||
auto numComponents = (size_t) lineStride * (size_t) jmax (1, height); | auto numComponents = (size_t) lineStride * (size_t) jmax (1, height); | ||||
# if JUCE_MAC && defined (MAC_OS_X_VERSION_10_14) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14 | |||||
// This version of the SDK intermittently requires a bit of extra space | |||||
// SDK version 10.14+ intermittently requires a bit of extra space | |||||
// at the end of the image data. This feels like something has gone | // at the end of the image data. This feels like something has gone | ||||
// wrong in Apple's code. | // wrong in Apple's code. | ||||
numComponents += (size_t) lineStride; | numComponents += (size_t) lineStride; | ||||
#endif | |||||
imageData->data.allocate (numComponents, clearImage); | imageData->data.allocate (numComponents, clearImage); | ||||
@@ -455,10 +455,7 @@ private: | |||||
{ | { | ||||
addMethod (menuItemInvokedSelector, menuItemInvoked); | addMethod (menuItemInvokedSelector, menuItemInvoked); | ||||
addMethod (@selector (validateMenuItem:), validateMenuItem); | addMethod (@selector (validateMenuItem:), validateMenuItem); | ||||
#if defined (MAC_OS_X_VERSION_10_14) | |||||
addProtocol (@protocol (NSMenuItemValidation)); | addProtocol (@protocol (NSMenuItemValidation)); | ||||
#endif | |||||
registerClass(); | registerClass(); | ||||
} | } | ||||
@@ -552,10 +549,7 @@ private: | |||||
addMethod (@selector (validateMenuItem:), validateMenuItem); | addMethod (@selector (validateMenuItem:), validateMenuItem); | ||||
addProtocol (@protocol (NSMenuDelegate)); | addProtocol (@protocol (NSMenuDelegate)); | ||||
#if defined (MAC_OS_X_VERSION_10_14) | |||||
addProtocol (@protocol (NSMenuItemValidation)); | addProtocol (@protocol (NSMenuItemValidation)); | ||||
#endif | |||||
registerClass(); | registerClass(); | ||||
} | } | ||||
@@ -375,7 +375,7 @@ private: | |||||
auto flags = FileBrowserComponent::openMode | FileBrowserComponent::canSelectFiles | auto flags = FileBrowserComponent::openMode | FileBrowserComponent::canSelectFiles | ||||
| ([parameters allowsMultipleSelection] ? FileBrowserComponent::canSelectMultipleItems : 0); | | ([parameters allowsMultipleSelection] ? FileBrowserComponent::canSelectMultipleItems : 0); | ||||
#if (defined (MAC_OS_X_VERSION_10_14) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14) | |||||
#if JUCE_MAC | |||||
if (@available (macOS 10.14, *)) | if (@available (macOS 10.14, *)) | ||||
{ | { | ||||
if ([parameters allowsDirectories]) | if ([parameters allowsDirectories]) | ||||