mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
iOS: Remove iOS 11 preprocessor checks
The current minimum-supported Xcode (10.1) includes the iOS 12.1 SDK, so APIs from iOS 10 will always be available.
This commit is contained in:
parent
f821015080
commit
a22b23e335
6 changed files with 9 additions and 45 deletions
|
|
@ -37,12 +37,6 @@
|
|||
#define JUCE_AUV3_MIDI_EVENT_LIST_SUPPORTED 1
|
||||
#endif
|
||||
|
||||
#if (JUCE_IOS && defined (__IPHONE_11_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0) \
|
||||
|| (JUCE_MAC && defined (MAC_OS_X_VERSION_10_13) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_13)
|
||||
#define JUCE_AUV3_MIDI_OUTPUT_SUPPORTED 1
|
||||
#define JUCE_AUV3_VIEW_CONFIG_SUPPORTED 1
|
||||
#endif
|
||||
|
||||
#ifndef __OBJC2__
|
||||
#error AUv3 needs Objective-C 2 support (compile with 64-bit)
|
||||
#endif
|
||||
|
|
@ -202,12 +196,11 @@ public:
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
#if JUCE_AUV3_VIEW_CONFIG_SUPPORTED
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wunguarded-availability", "-Wunguarded-availability-new")
|
||||
API_AVAILABLE (macos (10.13), ios (11.0))
|
||||
virtual NSIndexSet* getSupportedViewConfigurations (NSArray<AUAudioUnitViewConfiguration*>*) = 0;
|
||||
|
||||
API_AVAILABLE (macos (10.13), ios (11.0))
|
||||
virtual void selectViewConfiguration (AUAudioUnitViewConfiguration*) = 0;
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
#endif
|
||||
|
||||
private:
|
||||
struct Class : public ObjCClass<AUAudioUnit>
|
||||
|
|
@ -253,10 +246,8 @@ private:
|
|||
addMethod (@selector (supportsMPE), getSupportsMPE);
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
|
||||
#if JUCE_AUV3_MIDI_OUTPUT_SUPPORTED
|
||||
if (@available (macOS 10.13, iOS 11.0, *))
|
||||
addMethod (@selector (MIDIOutputNames), getMIDIOutputNames);
|
||||
#endif
|
||||
|
||||
//==============================================================================
|
||||
addMethod (@selector (internalRenderBlock), getInternalRenderBlock);
|
||||
|
|
@ -273,13 +264,11 @@ private:
|
|||
addMethod (@selector (setContextName:), setContextName);
|
||||
|
||||
//==============================================================================
|
||||
#if JUCE_AUV3_VIEW_CONFIG_SUPPORTED
|
||||
if (@available (macOS 10.13, iOS 11.0, *))
|
||||
{
|
||||
addMethod (@selector (supportedViewConfigurations:), getSupportedViewConfigurations);
|
||||
addMethod (@selector (selectViewConfiguration:), selectViewConfiguration);
|
||||
}
|
||||
#endif
|
||||
|
||||
registerClass();
|
||||
}
|
||||
|
|
@ -388,12 +377,11 @@ private:
|
|||
static void setContextName (id self, SEL, NSString* str) { return _this (self)->setContextName (str); }
|
||||
|
||||
//==============================================================================
|
||||
#if JUCE_AUV3_VIEW_CONFIG_SUPPORTED
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wunguarded-availability", "-Wunguarded-availability-new")
|
||||
API_AVAILABLE (macos (10.13), ios (11.0))
|
||||
static NSIndexSet* getSupportedViewConfigurations (id self, SEL, NSArray<AUAudioUnitViewConfiguration*>* configs) { return _this (self)->getSupportedViewConfigurations (configs); }
|
||||
|
||||
API_AVAILABLE (macos (10.13), ios (11.0))
|
||||
static void selectViewConfiguration (id self, SEL, AUAudioUnitViewConfiguration* config) { _this (self)->selectViewConfiguration (config); }
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
#endif
|
||||
};
|
||||
|
||||
static JuceAudioUnitv3Base* create (AUAudioUnit*, AudioComponentDescription, AudioComponentInstantiationOptions, NSError**);
|
||||
|
|
@ -883,8 +871,7 @@ public:
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
#if JUCE_AUV3_VIEW_CONFIG_SUPPORTED
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wunguarded-availability", "-Wunguarded-availability-new")
|
||||
API_AVAILABLE (macos (10.13), ios (11.0))
|
||||
NSIndexSet* getSupportedViewConfigurations (NSArray<AUAudioUnitViewConfiguration*>* configs) override
|
||||
{
|
||||
auto supportedViewIndecies = [[NSMutableIndexSet alloc] init];
|
||||
|
|
@ -917,12 +904,11 @@ public:
|
|||
return [supportedViewIndecies autorelease];
|
||||
}
|
||||
|
||||
API_AVAILABLE (macos (10.13), ios (11.0))
|
||||
void selectViewConfiguration (AUAudioUnitViewConfiguration* config) override
|
||||
{
|
||||
processorHolder->viewConfiguration.reset (new AudioProcessorHolder::ViewConfig { [config width], [config height], [config hostHasController] == YES });
|
||||
}
|
||||
JUCE_END_IGNORE_WARNINGS_GCC_LIKE
|
||||
#endif
|
||||
|
||||
struct ScopedKeyChange
|
||||
{
|
||||
|
|
@ -1640,7 +1626,7 @@ private:
|
|||
processBlock (audioBuffer.getBuffer (frameCount), midiMessages);
|
||||
|
||||
// send MIDI
|
||||
#if JucePlugin_ProducesMidiOutput && JUCE_AUV3_MIDI_OUTPUT_SUPPORTED
|
||||
#if JucePlugin_ProducesMidiOutput
|
||||
if (@available (macOS 10.13, iOS 11.0, *))
|
||||
{
|
||||
if (auto midiOut = midiOutputEventBlock)
|
||||
|
|
|
|||
|
|
@ -285,7 +285,6 @@ bool File::moveToTrash() const
|
|||
|
||||
JUCE_AUTORELEASEPOOL
|
||||
{
|
||||
#if JUCE_MAC || (JUCE_IOS && (defined (__IPHONE_11_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0))
|
||||
if (@available (macOS 10.8, iOS 11.0, *))
|
||||
{
|
||||
NSError* error = nil;
|
||||
|
|
@ -293,7 +292,6 @@ bool File::moveToTrash() const
|
|||
resultingItemURL: nil
|
||||
error: &error];
|
||||
}
|
||||
#endif
|
||||
|
||||
#if JUCE_IOS
|
||||
return deleteFile();
|
||||
|
|
|
|||
|
|
@ -37,10 +37,6 @@ static void juceFreeAccessibilityPlatformSpecificData (UIAccessibilityElement* e
|
|||
namespace juce
|
||||
{
|
||||
|
||||
#if defined (__IPHONE_11_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0
|
||||
#define JUCE_IOS_CONTAINER_API_AVAILABLE 1
|
||||
#endif
|
||||
|
||||
#define JUCE_NATIVE_ACCESSIBILITY_INCLUDED 1
|
||||
|
||||
template <typename> struct Signature;
|
||||
|
|
@ -123,7 +119,6 @@ private:
|
|||
return nil;
|
||||
});
|
||||
|
||||
#if JUCE_IOS_CONTAINER_API_AVAILABLE
|
||||
if (@available (iOS 11.0, *))
|
||||
{
|
||||
addMethod (@selector (accessibilityDataTableCellElementForRow:column:), [] (id self, SEL, NSUInteger row, NSUInteger column) -> id
|
||||
|
|
@ -194,7 +189,6 @@ private:
|
|||
return 0; // UIAccessibilityContainerTypeNone
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
registerClass();
|
||||
}
|
||||
|
|
@ -507,14 +501,12 @@ private:
|
|||
addProtocol (@protocol (UITextInput));
|
||||
}
|
||||
|
||||
#if JUCE_IOS_CONTAINER_API_AVAILABLE
|
||||
if (@available (iOS 11.0, *))
|
||||
{
|
||||
addMethod (@selector (accessibilityRowRange), getAccessibilityRowIndexRange);
|
||||
addMethod (@selector (accessibilityColumnRange), getAccessibilityColumnIndexRange);
|
||||
addProtocol (@protocol (UIAccessibilityContainerDataTableCell));
|
||||
}
|
||||
#endif
|
||||
|
||||
addIvar<UIAccessibilityElement*> ("container");
|
||||
|
||||
|
|
|
|||
|
|
@ -575,12 +575,10 @@ MultiTouchMapper<UITouch*> UIViewComponentPeer::currentTouches;
|
|||
return [[[NSBundle mainBundle] objectForInfoDictionaryKey: @"UIStatusBarHidden"] boolValue];
|
||||
}
|
||||
|
||||
#if defined (__IPHONE_11_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0
|
||||
- (BOOL) prefersHomeIndicatorAutoHidden
|
||||
{
|
||||
return isKioskModeView (self);
|
||||
}
|
||||
#endif
|
||||
|
||||
- (UIStatusBarStyle) preferredStatusBarStyle
|
||||
{
|
||||
|
|
|
|||
|
|
@ -791,7 +791,6 @@ static Rectangle<int> getRecommendedWindowBounds()
|
|||
|
||||
static BorderSize<int> getSafeAreaInsets (float masterScale)
|
||||
{
|
||||
#if defined (__IPHONE_11_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0
|
||||
if (@available (iOS 11.0, *))
|
||||
{
|
||||
UIEdgeInsets safeInsets = TemporaryWindow().window.safeAreaInsets;
|
||||
|
|
@ -800,7 +799,6 @@ static BorderSize<int> getSafeAreaInsets (float masterScale)
|
|||
safeInsets.bottom,
|
||||
safeInsets.right } / (double) masterScale);
|
||||
}
|
||||
#endif
|
||||
|
||||
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
|
||||
auto statusBarSize = [UIApplication sharedApplication].statusBarFrame.size;
|
||||
|
|
|
|||
|
|
@ -208,14 +208,12 @@ private:
|
|||
JUCE_CAMERA_LOG ("Locking focus with custom lens position supported: " + String ((int)device.lockingFocusWithCustomLensPositionSupported));
|
||||
}
|
||||
|
||||
#if defined (__IPHONE_11_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0
|
||||
if (@available (iOS 11.0, *))
|
||||
{
|
||||
JUCE_CAMERA_LOG ("Min available video zoom factor: " + String (device.minAvailableVideoZoomFactor));
|
||||
JUCE_CAMERA_LOG ("Max available video zoom factor: " + String (device.maxAvailableVideoZoomFactor));
|
||||
JUCE_CAMERA_LOG ("Dual camera switch over video zoom factor: " + String (device.dualCameraSwitchOverVideoZoomFactor));
|
||||
}
|
||||
#endif
|
||||
|
||||
JUCE_CAMERA_LOG ("Capture formats start-------------------");
|
||||
for (AVCaptureDeviceFormat* format in device.formats)
|
||||
|
|
@ -280,13 +278,11 @@ private:
|
|||
JUCE_CAMERA_LOG ("Cinematic video stabilization supported: " + String ((int) [format isVideoStabilizationModeSupported: AVCaptureVideoStabilizationModeCinematic]));
|
||||
JUCE_CAMERA_LOG ("Auto video stabilization supported: " + String ((int) [format isVideoStabilizationModeSupported: AVCaptureVideoStabilizationModeAuto]));
|
||||
|
||||
#if defined (__IPHONE_11_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0
|
||||
if (@available (iOS 11.0, *))
|
||||
{
|
||||
JUCE_CAMERA_LOG ("Min zoom factor for depth data delivery: " + String (format.videoMinZoomFactorForDepthDataDelivery));
|
||||
JUCE_CAMERA_LOG ("Max zoom factor for depth data delivery: " + String (format.videoMaxZoomFactorForDepthDataDelivery));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static String getHighResStillImgDimensionsString (CMVideoDimensions d)
|
||||
|
|
@ -688,7 +684,6 @@ private:
|
|||
JUCE_CAMERA_LOG ("Live photo capture supported: " + String ((int) photoOutput.livePhotoCaptureSupported));
|
||||
|
||||
|
||||
#if defined (__IPHONE_11_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0
|
||||
if (@available (iOS 11.0, *))
|
||||
{
|
||||
typesString.clear();
|
||||
|
|
@ -716,7 +711,6 @@ private:
|
|||
JUCE_CAMERA_LOG ("Camera calibration data delivery supported: " + String ((int) photoOutput.cameraCalibrationDataDeliverySupported));
|
||||
JUCE_CAMERA_LOG ("Depth data delivery supported: " + String ((int) photoOutput.depthDataDeliverySupported));
|
||||
}
|
||||
#endif
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
@ -758,13 +752,11 @@ private:
|
|||
addMethod (@selector (captureOutput:didCapturePhotoForResolvedSettings:), didCaptureForSettings);
|
||||
addMethod (@selector (captureOutput:didFinishCaptureForResolvedSettings:error:), didFinishCaptureForSettings);
|
||||
|
||||
#if defined (__IPHONE_11_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0
|
||||
if (@available (iOS 11.0, *))
|
||||
{
|
||||
addMethod (@selector (captureOutput:didFinishProcessingPhoto:error:), didFinishProcessingPhoto);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
addMethod (@selector (captureOutput:didFinishProcessingPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error:), didFinishProcessingPhotoSampleBuffer);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue