diff --git a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm index 97b43defda..722bd7aa67 100644 --- a/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm +++ b/modules/juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm @@ -499,10 +499,7 @@ namespace AudioUnitFormatHelpers static bool isPluginAUv3 (const AudioComponentDescription& desc) { - if (@available (macOS 10.11, *)) - return (desc.componentFlags & kAudioComponentFlag_IsV3AudioUnit) != 0; - - return false; + return (desc.componentFlags & kAudioComponentFlag_IsV3AudioUnit) != 0; } } @@ -580,17 +577,14 @@ static void createAudioUnit (VersionedAudioComponent versionedComponent, AudioUn { if (versionedComponent.isAUv3) { - if (@available (macOS 10.11, *)) - { - AudioComponentInstantiate (versionedComponent.audioComponent, - kAudioComponentInstantiation_LoadOutOfProcess, - ^(AudioComponentInstance audioUnit, OSStatus err) - { - callback (audioUnit, err); - }); + AudioComponentInstantiate (versionedComponent.audioComponent, + kAudioComponentInstantiation_LoadOutOfProcess, + ^(AudioComponentInstance audioUnit, OSStatus err) + { + callback (audioUnit, err); + }); - return; - } + return; } AudioComponentInstance audioUnit; @@ -2771,8 +2765,7 @@ private: { auto size = CGSizeZero; - if (@available (macOS 10.11, *)) - size = [controller preferredContentSize]; + size = [controller preferredContentSize]; if (approximatelyEqual (size.width, 0.0) || approximatelyEqual (size.height, 0.0)) size = controller.view.frame.size; diff --git a/modules/juce_audio_utils/native/juce_BluetoothMidiDevicePairingDialogue_mac.mm b/modules/juce_audio_utils/native/juce_BluetoothMidiDevicePairingDialogue_mac.mm index 92cf452449..7717568bdf 100644 --- a/modules/juce_audio_utils/native/juce_BluetoothMidiDevicePairingDialogue_mac.mm +++ b/modules/juce_audio_utils/native/juce_BluetoothMidiDevicePairingDialogue_mac.mm @@ -36,7 +36,7 @@ namespace juce { //============================================================================== -class API_AVAILABLE (macos (10.11)) BluetoothMidiPairingWindowClass final : public ObjCClass +class BluetoothMidiPairingWindowClass final : public ObjCClass { public: struct Callbacks @@ -126,7 +126,7 @@ private: } }; -class API_AVAILABLE (macos (10.11)) BluetoothMidiSelectorWindowHelper final : public DeletedAtShutdown +class BluetoothMidiSelectorWindowHelper final : public DeletedAtShutdown { public: BluetoothMidiSelectorWindowHelper (ModalComponentManager::Callback* exitCallback, @@ -166,26 +166,13 @@ private: bool BluetoothMidiDevicePairingDialogue::open (ModalComponentManager::Callback* exitCallback, Rectangle* bounds) { - if (@available (macOS 10.11, *)) - { - new BluetoothMidiSelectorWindowHelper (exitCallback, bounds); - return true; - } - - std::unique_ptr cb (exitCallback); - // This functionality is unavailable when targetting OSX < 10.11. Instead, - // you should pair Bluetooth MIDI devices using the "Audio MIDI Setup" app - // (located in /Applications/Utilities). - jassertfalse; - return false; + new BluetoothMidiSelectorWindowHelper (exitCallback, bounds); + return true; } bool BluetoothMidiDevicePairingDialogue::isAvailable() { - if (@available (macOS 10.11, *)) - return true; - - return false; + return true; } } // namespace juce diff --git a/modules/juce_gui_basics/native/juce_FileChooser_mac.mm b/modules/juce_gui_basics/native/juce_FileChooser_mac.mm index 6544d649d7..4987e5f2bb 100644 --- a/modules/juce_gui_basics/native/juce_FileChooser_mac.mm +++ b/modules/juce_gui_basics/native/juce_FileChooser_mac.mm @@ -129,13 +129,10 @@ public: preview->addToDesktop (0, (void*) nsViewPreview); preview->setVisible (true); - if (@available (macOS 10.11, *)) + if (! isSave) { - if (! isSave) - { - auto* openPanel = static_cast (panel); - [openPanel setAccessoryViewDisclosed: YES]; - } + auto* openPanel = static_cast (panel); + [openPanel setAccessoryViewDisclosed: YES]; } } diff --git a/modules/juce_gui_basics/native/juce_MainMenu_mac.mm b/modules/juce_gui_basics/native/juce_MainMenu_mac.mm index 64a16385cf..f28670d8eb 100644 --- a/modules/juce_gui_basics/native/juce_MainMenu_mac.mm +++ b/modules/juce_gui_basics/native/juce_MainMenu_mac.mm @@ -371,18 +371,8 @@ private: { NSArray* array = nil; - if (@available (macOS 10.11, *)) - { - [menuNib instantiateWithOwner: NSApp - topLevelObjects: &array]; - } - else - { - JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations") - [menuNib instantiateNibWithOwner: NSApp - topLevelObjects: &array]; - JUCE_END_IGNORE_WARNINGS_GCC_LIKE - } + [menuNib instantiateWithOwner: NSApp + topLevelObjects: &array]; for (id object in array) { diff --git a/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm b/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm index 68c9348e7f..9ed65c51c4 100644 --- a/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm +++ b/modules/juce_gui_basics/native/juce_NSViewComponentPeer_mac.mm @@ -398,13 +398,8 @@ public: } else { - // Repaint behaviour of setFrame seemed to change in 10.11, and the drawing became synchronous, - // causing performance issues. But sending an async update causes flickering in older versions, - // hence this version check to use the old behaviour on pre 10.11 machines - static bool isPre10_11 = SystemStats::getOperatingSystemType() <= SystemStats::MacOSX_10_10; - [window setFrame: [window frameRectForContentRect: flippedScreenRect (r)] - display: isPre10_11]; + display: false]; } if (! CGSizeEqualToSize (oldViewSize, r.size)) @@ -1962,13 +1957,9 @@ private: void setFullScreenSizeConstraints (const ComponentBoundsConstrainer& c) { - if (@available (macOS 10.11, *)) - { - const auto minSize = NSMakeSize (static_cast (c.getMinimumWidth()), - 0.0f); - [window setMinFullScreenContentSize: minSize]; - [window setMaxFullScreenContentSize: NSMakeSize (100000, 100000)]; - } + const auto minSize = NSMakeSize (static_cast (c.getMinimumWidth()), 0.0f); + [window setMinFullScreenContentSize: minSize]; + [window setMaxFullScreenContentSize: NSMakeSize (100000, 100000)]; } void displayLayer ([[maybe_unused]] CALayer* layer) override diff --git a/modules/juce_gui_extra/native/juce_WebBrowserComponent_mac.mm b/modules/juce_gui_extra/native/juce_WebBrowserComponent_mac.mm index 43e9efa82e..fbc0765d78 100644 --- a/modules/juce_gui_extra/native/juce_WebBrowserComponent_mac.mm +++ b/modules/juce_gui_extra/native/juce_WebBrowserComponent_mac.mm @@ -786,12 +786,12 @@ private: JUCE_END_IGNORE_WARNINGS_GCC_LIKE #endif -class API_AVAILABLE (macos (10.11)) WebBrowserComponent::Impl::Platform::WKWebViewImpl : public WebBrowserComponent::Impl::PlatformInterface, - #if JUCE_MAC - public NSViewComponent - #else - public UIViewComponent - #endif +class WebBrowserComponent::Impl::Platform::WKWebViewImpl : public WebBrowserComponent::Impl::PlatformInterface, + #if JUCE_MAC + public NSViewComponent + #else + public UIViewComponent + #endif { public: WKWebViewImpl (WebBrowserComponent::Impl& implIn, @@ -1085,14 +1085,7 @@ auto WebBrowserComponent::Impl::createAndInitPlatformDependentPart (WebBrowserCo const StringArray& userScripts) -> std::unique_ptr { - if (@available (macOS 10.11, *)) - return std::make_unique (impl, options, userScripts); - - #if JUCE_MAC - return std::make_unique (impl, options.getUserAgent()); - #endif - - return {}; + return std::make_unique (impl, options, userScripts); } //==============================================================================