From ba9b6581b74d4438a3d89f93c3df05381c05549b Mon Sep 17 00:00:00 2001 From: reuk Date: Tue, 2 Jul 2024 18:07:32 +0100 Subject: [PATCH] Platform: Remove references to unsupported platforms in docs and strings --- examples/Utilities/PushNotificationsDemo.h | 4 ++-- extras/Build/CMake/JUCEModuleSupport.cmake | 3 +-- .../native/juce_CoreMidi_mac.mm | 2 -- .../processors/juce_AudioProcessorEditor.h | 8 +++---- .../misc/juce_PushNotifications.h | 22 ++++++++----------- .../native/juce_PushNotifications_ios.cpp | 2 +- .../juce_video/capture/juce_CameraDevice.h | 2 +- .../juce_video/native/juce_CameraDevice_ios.h | 2 +- 8 files changed, 18 insertions(+), 27 deletions(-) diff --git a/examples/Utilities/PushNotificationsDemo.h b/examples/Utilities/PushNotificationsDemo.h index dd0196aa1c..d45a7ebc70 100644 --- a/examples/Utilities/PushNotificationsDemo.h +++ b/examples/Utilities/PushNotificationsDemo.h @@ -314,9 +314,9 @@ private: if (! n.isValid()) { #if JUCE_IOS - String requiredFields = "identifier (from iOS 10), title, body and category"; + String requiredFields = "identifier, title, body and category"; #elif JUCE_ANDROID - String requiredFields = "channel ID (from Android O), title, body and icon"; + String requiredFields = "channel ID, title, body and icon"; #else String requiredFields = "all required fields"; #endif diff --git a/extras/Build/CMake/JUCEModuleSupport.cmake b/extras/Build/CMake/JUCEModuleSupport.cmake index b4e47e3d2e..ea6727cb0c 100644 --- a/extras/Build/CMake/JUCEModuleSupport.cmake +++ b/extras/Build/CMake/JUCEModuleSupport.cmake @@ -307,8 +307,7 @@ function(_juce_link_frameworks target visibility) set(framework_flags "${juce_found_${framework}}") endif() elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS") - # CoreServices is only available on iOS 12+, we must link it weakly on earlier platforms - if(JUCE_LINK_FRAMEWORKS_WEAK OR ((framework STREQUAL "CoreServices") AND (CMAKE_OSX_DEPLOYMENT_TARGET LESS 12.0))) + if(JUCE_LINK_FRAMEWORKS_WEAK) set(framework_flags "-weak_framework ${framework}") else() set(framework_flags "-framework ${framework}") diff --git a/modules/juce_audio_devices/native/juce_CoreMidi_mac.mm b/modules/juce_audio_devices/native/juce_CoreMidi_mac.mm index d921124233..38e6d3a650 100644 --- a/modules/juce_audio_devices/native/juce_CoreMidi_mac.mm +++ b/modules/juce_audio_devices/native/juce_CoreMidi_mac.mm @@ -571,8 +571,6 @@ namespace CoreMidiHelpers { static const auto globalMidiClient = [&] { - // Since OSX 10.6, the MIDIClientCreate function will only work - // correctly when called from the message thread! JUCE_ASSERT_MESSAGE_THREAD enableSimulatorMidiSession(); diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h index 7a3760ae06..85f52cd264 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessorEditor.h @@ -106,9 +106,8 @@ public: /** Override this method to indicate if your editor supports the presence or absence of a host-provided MIDI controller. - Currently only AUv3 plug-ins compiled for MacOS 10.13 or iOS 11.0 (or later) - support this functionality, and even then the host may choose to ignore this - information. + Currently only AUv3 plug-ins support this functionality, and even then the + host may choose to ignore this information. The default behaviour is to report support for both cases. */ @@ -120,8 +119,7 @@ public: Use this as an opportunity to hide or display your own onscreen keyboard or other input component. - Currently only AUv3 plug-ins compiled for MacOS 10.13 or iOS 11.0 (or later) - support this functionality. + Currently only AUv3 plug-ins support this functionality. */ virtual void hostMIDIControllerIsAvailable (bool controllerIsAvailable); diff --git a/modules/juce_gui_extra/misc/juce_PushNotifications.h b/modules/juce_gui_extra/misc/juce_PushNotifications.h index ac8176ff66..7a497874e9 100644 --- a/modules/juce_gui_extra/misc/juce_PushNotifications.h +++ b/modules/juce_gui_extra/misc/juce_PushNotifications.h @@ -97,7 +97,7 @@ public: bool triggerInBackground = false; /**< Whether the app can process the action in background. */ bool destructive = false; /**< Whether to display the action as destructive. */ String textInputButtonText; /**< Optional: Text displayed on text input notification - button (from iOS 10 only). + button. Note that it will be ignored if style is set to Style::button. */ /**@}*/ @@ -130,8 +130,7 @@ public: judiciously. On iOS available from version 10. On Android available from API 16. */ String groupId; /**< Optional: allows the OS to visually group, collapse, and expand a set of notifications, - note that OS may automatically group notifications if no groupId is specified. - Available on Android API 20 or above and iOS 10 or above. */ + note that OS may automatically group notifications if no groupId is specified. */ int badgeNumber = 0; /**< Optional: on platforms that support it, can set a number this notification represents. */ URL soundToPlay; /**< Optional: empty when the notification should be silent. When the name is set to @@ -165,7 +164,7 @@ public: in requestPermissionsWithSettings()). */ double triggerIntervalSec = 0.; /**< Optional: specifies number of seconds before the notification should trigger. */ bool repeat = false; /**< Optional: allows the notification to continuously retrigger after - triggerIntervalSec seconds. Available from iOS 10. */ + triggerIntervalSec seconds. */ /**@}*/ @@ -406,7 +405,7 @@ public: { juce::String identifier; /**< unique identifier */ juce::Array actions; /**< optional list of actions within this category */ - bool sendDismissAction = false; /**< whether dismiss action will be sent to the app (from iOS 10 only) */ + bool sendDismissAction = false; /**< whether dismiss action will be sent to the app */ }; bool allowSound = false; /**< whether the app should play a sound upon notification */ @@ -507,7 +506,7 @@ public: */ void getPendingLocalNotifications() const; - /** Unschedules a pending local notification with a given identifier. Available from iOS 10. */ + /** Unschedules a pending local notification with a given identifier. */ void removePendingLocalNotification (const String& identifier); /** Unschedules all pending local notifications. iOS only. */ @@ -520,9 +519,8 @@ public: bool areNotificationsEnabled() const; /** On iOS as well as on Android, sends a local notification. - On Android and iOS 10 or above, this will refresh an existing notification - if the same identifier is used as in a notification that was already sent - and not yet responded by a user. + This will refresh an existing notification if the same identifier is used as in + a notification that was already sent and not yet responded by a user. */ void sendLocalNotification (const Notification& notification); @@ -613,15 +611,13 @@ public: virtual void notificationSettingsReceived (const Settings& settings); /** Called when the list of pending notifications, requested by calling - getPendingLocalNotifications() is returned. iOS 10 or above only. + getPendingLocalNotifications() is returned. */ virtual void pendingLocalNotificationsListReceived (const Array& notifications); /** This can be called in multiple different situations, depending on the OS and the situation. - On pre iOS 10 device it will be called when a user presses on a notification or when a - notification was received when the app was in the foreground already. On iOS 10 it will be - called when a user presses on a notification + This will be called when a user presses on a notification Note: On Android, if remote notification was received while the app was in the background and then user pressed on it, the notification object received in this callback will contain only diff --git a/modules/juce_gui_extra/native/juce_PushNotifications_ios.cpp b/modules/juce_gui_extra/native/juce_PushNotifications_ios.cpp index 89975d3a3d..d836bc688f 100644 --- a/modules/juce_gui_extra/native/juce_PushNotifications_ios.cpp +++ b/modules/juce_gui_extra/native/juce_PushNotifications_ios.cpp @@ -132,7 +132,7 @@ struct PushNotificationsDelegateDetails } // request - // each notification on iOS 10 needs to have an identifier, otherwise it will not show up + // each notification needs to have an identifier, otherwise it will not show up jassert (n.identifier.isNotEmpty()); UNNotificationRequest* request = [UNNotificationRequest requestWithIdentifier: juceStringToNS (n.identifier) content: content diff --git a/modules/juce_video/capture/juce_CameraDevice.h b/modules/juce_video/capture/juce_CameraDevice.h index 745b0d10f5..367a982e3e 100644 --- a/modules/juce_video/capture/juce_CameraDevice.h +++ b/modules/juce_video/capture/juce_CameraDevice.h @@ -82,7 +82,7 @@ public: using OpenCameraResultCallback = std::function; - /** Asynchronously opens a camera device on iOS (iOS 7+) or Android (API 21+). + /** Asynchronously opens a camera device on iOS or Android. On other platforms, the function will simply call openDevice(). Upon completion, resultCallback will be invoked with valid CameraDevice* and an empty error String on success, or nullptr CameraDevice and a non-empty error String on failure. diff --git a/modules/juce_video/native/juce_CameraDevice_ios.h b/modules/juce_video/native/juce_CameraDevice_ios.h index 864ea76223..92674180fb 100644 --- a/modules/juce_video/native/juce_CameraDevice_ios.h +++ b/modules/juce_video/native/juce_CameraDevice_ios.h @@ -267,7 +267,7 @@ private: } JUCE_CAMERA_LOG ("Auto focus system: " + autoFocusSystemString); - JUCE_CAMERA_LOG ("Standard (iOS 5.0) video stabilization supported: " + String ((int) [format isVideoStabilizationModeSupported: AVCaptureVideoStabilizationModeStandard])); + JUCE_CAMERA_LOG ("Standard video stabilization supported: " + String ((int) [format isVideoStabilizationModeSupported: AVCaptureVideoStabilizationModeStandard])); JUCE_CAMERA_LOG ("Cinematic video stabilization supported: " + String ((int) [format isVideoStabilizationModeSupported: AVCaptureVideoStabilizationModeCinematic])); JUCE_CAMERA_LOG ("Auto video stabilization supported: " + String ((int) [format isVideoStabilizationModeSupported: AVCaptureVideoStabilizationModeAuto]));