summaryrefslogtreecommitdiff
path: root/platform/iphone
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-05-10 21:02:26 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-05-10 21:11:34 +0300
commitffe61e0895fd1aea746619280eca3cfd59b0c182 (patch)
tree5c882fd193a2ceca93aae1814c3f46b42e946e31 /platform/iphone
parentcc3ed63af68ea9262bf8015d34aa6dd6327112e8 (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.h6
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"