diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-05-10 21:02:26 +0300 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-05-10 21:11:34 +0300 |
commit | ffe61e0895fd1aea746619280eca3cfd59b0c182 (patch) | |
tree | 5c882fd193a2ceca93aae1814c3f46b42e946e31 /platform/iphone | |
parent | cc3ed63af68ea9262bf8015d34aa6dd6327112e8 (diff) |
[macOS / iOS] Fix text-to-speech build with older macOS / iOS SDK.
Add __has_include check for AVFAudio include.
Add some explicit casts to avoid conflicts.
Change all `include`s to `import`s for consistency.
Diffstat (limited to 'platform/iphone')
-rw-r--r-- | platform/iphone/tts_ios.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/platform/iphone/tts_ios.h b/platform/iphone/tts_ios.h index c7defeb98f..3fac762b62 100644 --- a/platform/iphone/tts_ios.h +++ b/platform/iphone/tts_ios.h @@ -31,7 +31,11 @@ #ifndef TTS_IOS_H #define TTS_IOS_H -#include <AVFAudio/AVSpeechSynthesis.h> +#if __has_include(<AVFAudio/AVSpeechSynthesis.h>) +#import <AVFAudio/AVSpeechSynthesis.h> +#else +#import <AVFoundation/AVFoundation.h> +#endif #include "core/string/ustring.h" #include "core/templates/list.h" |