The current minimum-supported Xcode (10.1) includes the iOS 12.1 SDK, so APIs from iOS 12 will always be available.v7.0.9
| @@ -28,7 +28,7 @@ | |||||
| #if JUCE_MAC || JUCE_IOS | #if JUCE_MAC || JUCE_IOS | ||||
| #if 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 | #define GLES_SILENCE_DEPRECATION 1 | ||||
| #endif | #endif | ||||
| @@ -773,7 +773,6 @@ MultiTouchMapper<UITouch*> UIViewComponentPeer::currentTouches; | |||||
| { | { | ||||
| [super traitCollectionDidChange: previousTraitCollection]; | [super traitCollectionDidChange: previousTraitCollection]; | ||||
| #if defined (__IPHONE_12_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_12_0 | |||||
| if (@available (iOS 12.0, *)) | if (@available (iOS 12.0, *)) | ||||
| { | { | ||||
| const auto wasDarkModeActive = ([previousTraitCollection userInterfaceStyle] == UIUserInterfaceStyleDark); | const auto wasDarkModeActive = ([previousTraitCollection userInterfaceStyle] == UIUserInterfaceStyleDark); | ||||
| @@ -782,7 +781,6 @@ MultiTouchMapper<UITouch*> UIViewComponentPeer::currentTouches; | |||||
| [[NSNotificationCenter defaultCenter] postNotificationName: UIViewComponentPeer::getDarkModeNotificationName() | [[NSNotificationCenter defaultCenter] postNotificationName: UIViewComponentPeer::getDarkModeNotificationName() | ||||
| object: nil]; | object: nil]; | ||||
| } | } | ||||
| #endif | |||||
| } | } | ||||
| - (BOOL) isAccessibilityElement | - (BOOL) isAccessibilityElement | ||||
| @@ -691,10 +691,8 @@ bool Desktop::canUseSemiTransparentWindows() noexcept | |||||
| bool Desktop::isDarkModeActive() const | bool Desktop::isDarkModeActive() const | ||||
| { | { | ||||
| #if defined (__IPHONE_12_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_12_0 | |||||
| if (@available (iOS 12.0, *)) | if (@available (iOS 12.0, *)) | ||||
| return [[[UIScreen mainScreen] traitCollection] userInterfaceStyle] == UIUserInterfaceStyleDark; | return [[[UIScreen mainScreen] traitCollection] userInterfaceStyle] == UIUserInterfaceStyleDark; | ||||
| #endif | |||||
| return false; | return false; | ||||
| } | } | ||||