diff --git a/modules/juce_audio_basics/utilities/juce_AudioWorkgroup.cpp b/modules/juce_audio_basics/utilities/juce_AudioWorkgroup.cpp index 18abd0ede5..fc93aef12c 100644 --- a/modules/juce_audio_basics/utilities/juce_AudioWorkgroup.cpp +++ b/modules/juce_audio_basics/utilities/juce_AudioWorkgroup.cpp @@ -68,13 +68,13 @@ public: private: static void detach (os_workgroup_t wg, os_workgroup_join_token_s token) { - if (@available (macos 11.0, ios 14.0, *)) + if (@available (macOS 11.0, iOS 14.0, *)) os_workgroup_leave (wg, &token); } static bool attach (os_workgroup_t wg, os_workgroup_join_token_s& tokenOut) { - if (@available (macos 11.0, ios 14.0, *)) + if (@available (macOS 11.0, iOS 14.0, *)) { if (wg != nullptr && os_workgroup_join (wg, &tokenOut) == 0) return true; @@ -220,7 +220,7 @@ size_t AudioWorkgroup::getMaxParallelThreadCount() const { #if JUCE_AUDIOWORKGROUP_TYPES_AVAILABLE - if (@available (macos 11.0, ios 14.0, *)) + if (@available (macOS 11.0, iOS 14.0, *)) { if (auto wg = WorkgroupProvider::getWorkgroup (*this)) return (size_t) os_workgroup_max_parallel_threads (wg, nullptr); diff --git a/modules/juce_audio_devices/native/juce_Audio_ios.cpp b/modules/juce_audio_devices/native/juce_Audio_ios.cpp index 4022aaa124..ae8d54382d 100644 --- a/modules/juce_audio_devices/native/juce_Audio_ios.cpp +++ b/modules/juce_audio_devices/native/juce_Audio_ios.cpp @@ -393,7 +393,7 @@ struct iOSAudioIODevice::Pimpl final : public AsyncUpdater JUCE_NSERROR_CHECK ([[AVAudioSession sharedInstance] setActive: enabled error: &error]); - if (@available (ios 18, *)) + if (@available (iOS 18, *)) { if (enabled) { @@ -419,7 +419,7 @@ struct iOSAudioIODevice::Pimpl final : public AsyncUpdater // Older iOS versions (iOS 12) seem to require that the requested buffer size is a bit // larger than the desired buffer size. // This breaks on iOS 18, which needs the buffer duration to be as precise as possible. - if (@available (ios 18, *)) + if (@available (iOS 18, *)) return 0; return 1; @@ -434,7 +434,7 @@ struct iOSAudioIODevice::Pimpl final : public AsyncUpdater // iOS requires additional effort to observe the actual buffer size // change however, it seems the buffer size change will always work // so instead we just assume the change will apply eventually - if (@available (ios 18, *)) + if (@available (iOS 18, *)) return newBufferSize; return getBufferSize (currentSampleRate); @@ -449,7 +449,7 @@ struct iOSAudioIODevice::Pimpl final : public AsyncUpdater constexpr auto suggestedMin = 64; constexpr auto suggestedMax = 4096; - if (@available (ios 18, *)) + if (@available (iOS 18, *)) return std::tuple (suggestedMin, suggestedMax); const auto min = tryBufferSize (sampleRate, suggestedMin); @@ -541,11 +541,11 @@ struct iOSAudioIODevice::Pimpl final : public AsyncUpdater // On iOS 18 the AVAudioSession sample rate is not always accurate but // probing the sample rate via an AudioQueue seems to work reliably - if (@available (ios 18, *)) + if (@available (iOS 18, *)) { // On iOS 26, things seem to work as expected again, // so avoid creating an AudioQueue - if (@available (ios 26, *)) + if (@available (iOS 26, *)) return session.sampleRate; return getSampleRateFromAudioQueue().value_or (session.sampleRate); diff --git a/modules/juce_audio_devices/native/juce_CoreMidi_mac.mm b/modules/juce_audio_devices/native/juce_CoreMidi_mac.mm index 1ae37303ab..7b4f8890d8 100644 --- a/modules/juce_audio_devices/native/juce_CoreMidi_mac.mm +++ b/modules/juce_audio_devices/native/juce_CoreMidi_mac.mm @@ -546,7 +546,7 @@ struct CoreMidiHelpers std::optional getCachedInfo (const ump::EndpointId& x) const { #if JUCE_COREMIDI_UMP_ENDPOINT_CAN_BE_BUILT - if (@available (macos 15, ios 18, *)) + if (@available (macOS 15, iOS 18, *)) if (const auto iter = virtualEndpoints.find (x); iter != virtualEndpoints.end()) return getInfoForEndpoint (iter->second); #endif @@ -627,7 +627,7 @@ struct CoreMidiHelpers SharedEndpointsImplNative (MIDIClientRef c, ump::EndpointsListener& l) : client (c), listener (l) { - if (@available (macos 15.0, ios 18.0, *)) + if (@available (macOS 15.0, iOS 18.0, *)) observers.emplace (*this); } @@ -846,7 +846,7 @@ struct CoreMidiHelpers static std::map findNativeUMPEndpoints() { #if JUCE_COREMIDI_UMP_ENDPOINT_CAN_BE_BUILT - if (@available (macos 15, ios 18, *)) + if (@available (macOS 15, iOS 18, *)) { std::map result; @@ -867,7 +867,7 @@ struct CoreMidiHelpers static std::optional getUMPActiveGroupBitmap ([[maybe_unused]] MIDIEndpointRef r) { #if JUCE_MAC_API_VERSION_CAN_BE_BUILT (14, 0) || JUCE_IOS_API_VERSION_CAN_BE_BUILT (17, 0) - if (@available (macos 14, ios 17, *)) + if (@available (macOS 14, iOS 17, *)) { SInt32 bitmap{}; @@ -884,7 +884,7 @@ struct CoreMidiHelpers static bool canTransmitGroupless ([[maybe_unused]] MIDIEndpointRef endpoint) { #if JUCE_MAC_API_VERSION_CAN_BE_BUILT (14, 0) || JUCE_IOS_API_VERSION_CAN_BE_BUILT (17, 0) - if (@available (macos 14, ios 17, *)) + if (@available (macOS 14, iOS 17, *)) { SInt32 result; if (MIDIObjectGetIntegerProperty (endpoint, kMIDIPropertyUMPCanTransmitGroupless, &result) == noErr) @@ -2385,7 +2385,7 @@ struct CoreMidiHelpers [[maybe_unused]] ump::BlocksAreStatic areStatic) override { #if JUCE_COREMIDI_UMP_ENDPOINT_CAN_BE_BUILT - if (@available (macos 15, ios 18, *)) + if (@available (macOS 15, iOS 18, *)) { auto connection = VirtualEndpointImplNative::make (cachedEndpoints, deviceName, @@ -2497,7 +2497,7 @@ struct CoreMidiHelpers bool isVirtualMidiUmpServiceActive() const override { - if (@available (macos 15, ios 18, *)) + if (@available (macOS 15, iOS 18, *)) return true; return false; diff --git a/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_1.mm b/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_1.mm index e3e97e3437..8f4f508a72 100644 --- a/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_1.mm +++ b/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU_1.mm @@ -746,7 +746,7 @@ public: if (inDataSize != sizeof (AUMIDIEventListBlock)) return kAudioUnitErr_InvalidPropertyValue; - if (@available (macos 12, *)) + if (@available (macOS 12, *)) eventListOutput.setBlock (*static_cast (inData)); return noErr; diff --git a/modules/juce_core/native/juce_ObjCHelpers_mac.h b/modules/juce_core/native/juce_ObjCHelpers_mac.h index aa4e45d218..f612fee191 100644 --- a/modules/juce_core/native/juce_ObjCHelpers_mac.h +++ b/modules/juce_core/native/juce_ObjCHelpers_mac.h @@ -664,7 +664,7 @@ private: return Trait::newFn (std::forward (args)...); \ else if constexpr (__IPHONE_OS_VERSION_MAX_ALLOWED < fullVersion) \ return Trait::oldFn (std::forward (args)...); \ - else if (@available (ios major ## . ## minor, *)) \ + else if (@available (iOS major ## . ## minor, *)) \ return Trait::newFn (std::forward (args)...); \ else \ return Trait::oldFn (std::forward (args)...); \ diff --git a/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm b/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm index 8bf78628a5..b4a57933d6 100644 --- a/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm +++ b/modules/juce_gui_basics/native/juce_UIViewComponentPeer_ios.mm @@ -552,7 +552,7 @@ private: if (isSharedWindow) return; - if (@available (ios 13, *)) + if (@available (iOS 13, *)) { window.windowScene = windowSceneTracker->getWindowScene(); } @@ -1085,7 +1085,7 @@ static void postTraitChangeNotification (UITraitCollection* previousTraitCollect { [super traitCollectionDidChange: previousTraitCollection]; - if (@available (ios 17, *)) + if (@available (iOS 17, *)) {} // do nothing else postTraitChangeNotification (previousTraitCollection); @@ -1793,7 +1793,7 @@ UIViewComponentPeer::UIViewComponentPeer (Component& comp, window = [[JuceUIWindow alloc] initWithFrame: r]; - if (@available (ios 13, *)) + if (@available (iOS 13, *)) { window.windowScene = windowSceneTracker->getWindowScene(); } diff --git a/modules/juce_gui_basics/native/juce_Windowing_ios.mm b/modules/juce_gui_basics/native/juce_Windowing_ios.mm index 4f75432b1a..e3bcf5b7ba 100644 --- a/modules/juce_gui_basics/native/juce_Windowing_ios.mm +++ b/modules/juce_gui_basics/native/juce_Windowing_ios.mm @@ -610,7 +610,7 @@ struct TemporaryWindow { UIWindow* window = std::invoke ([&] { - if (@available (ios 13, *)) + if (@available (iOS 13, *)) { SharedResourcePointer windowSceneTracker; diff --git a/modules/juce_video/native/juce_CameraDevice_ios.h b/modules/juce_video/native/juce_CameraDevice_ios.h index d0812c71d8..7ac440f37e 100644 --- a/modules/juce_video/native/juce_CameraDevice_ios.h +++ b/modules/juce_video/native/juce_CameraDevice_ios.h @@ -1202,7 +1202,7 @@ struct CameraDevice::ViewerComponent : public UIViewComponent static void updateOrientation (id self) { - if (@available (ios 17, *)) + if (@available (iOS 17, *)) return; if (auto* previewLayer = getPreviewLayer (self))