From 76e95d01edb1fbeff52dd5135bbd686f3d518bc2 Mon Sep 17 00:00:00 2001 From: reuk Date: Tue, 19 Jul 2022 13:59:24 +0100 Subject: [PATCH] iOS: Remove iOS 12 preprocessor checks The current minimum-supported Xcode (10.1) includes the iOS 12.1 SDK, so APIs from iOS 12 will always be available. --- modules/juce_core/native/juce_BasicNativeHeaders.h | 2 +- modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm | 2 -- modules/juce_gui_basics/native/juce_ios_Windowing.mm | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/juce_core/native/juce_BasicNativeHeaders.h b/modules/juce_core/native/juce_BasicNativeHeaders.h index 52397e8860..fa8486b809 100644 --- a/modules/juce_core/native/juce_BasicNativeHeaders.h +++ b/modules/juce_core/native/juce_BasicNativeHeaders.h @@ -28,7 +28,7 @@ #if JUCE_MAC || JUCE_IOS #if JUCE_IOS - #if JUCE_MODULE_AVAILABLE_juce_opengl && defined (__IPHONE_12_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_12_0 + #if JUCE_MODULE_AVAILABLE_juce_opengl #define GLES_SILENCE_DEPRECATION 1 #endif diff --git a/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm index 0f77a428e0..73c1384ded 100644 --- a/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_ios_UIViewComponentPeer.mm @@ -773,7 +773,6 @@ MultiTouchMapper UIViewComponentPeer::currentTouches; { [super traitCollectionDidChange: previousTraitCollection]; - #if defined (__IPHONE_12_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_12_0 if (@available (iOS 12.0, *)) { const auto wasDarkModeActive = ([previousTraitCollection userInterfaceStyle] == UIUserInterfaceStyleDark); @@ -782,7 +781,6 @@ MultiTouchMapper UIViewComponentPeer::currentTouches; [[NSNotificationCenter defaultCenter] postNotificationName: UIViewComponentPeer::getDarkModeNotificationName() object: nil]; } - #endif } - (BOOL) isAccessibilityElement diff --git a/modules/juce_gui_basics/native/juce_ios_Windowing.mm b/modules/juce_gui_basics/native/juce_ios_Windowing.mm index f5f03c32ed..b084974335 100644 --- a/modules/juce_gui_basics/native/juce_ios_Windowing.mm +++ b/modules/juce_gui_basics/native/juce_ios_Windowing.mm @@ -691,10 +691,8 @@ bool Desktop::canUseSemiTransparentWindows() noexcept bool Desktop::isDarkModeActive() const { - #if defined (__IPHONE_12_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_12_0 if (@available (iOS 12.0, *)) return [[[UIScreen mainScreen] traitCollection] userInterfaceStyle] == UIUserInterfaceStyleDark; - #endif return false; }