Skip to content

知了 Cicada · 任何会议和直播的实时字幕、同声传译、AI 会议纪要,Mac、Windows、Linux、Android 免费开源。Live subtitles, interpreting and meeting notes for any call or stream, on Mac, Windows, Linux and Android.

build(ios): the shared-sources check no longer rejects SwiftUI, which iOS has

wquguru7042a4207415
diff --git a/ios/scripts/typecheck.sh b/ios/scripts/typecheck.sh
index 64cdaf4..0bbf240 100755
--- a/ios/scripts/typecheck.sh
+++ b/ios/scripts/typecheck.sh
@@ -7,7 +7,7 @@ files=()
while IFS= read -r line; do [[ -z $line || $line == \#* ]] || files+=("$line"); done < ios/shared-sources.txt
shared=("${files[@]}")
while IFS= read -r f; do files+=("$f"); done < <(find ios/Sources -name '*.swift' | sort)
-bad=$(awk '/^#if (os\(macOS\)|canImport\(AppKit\)|!CICADA_IOS)/{g=1} /^#endif/{g=0} !g && /^import (AppKit|CoreAudio|Carbon|SwiftUI|ServiceManagement|IOKit)$/{print FILENAME": "$0}' "${shared[@]}")
+bad=$(awk '/^#if (os\(macOS\)|canImport\(AppKit\)|!CICADA_IOS)/{g=1} /^#endif/{g=0} !g && /^import (AppKit|CoreAudio|Carbon|ServiceManagement|IOKit)$/{print FILENAME": "$0}' "${shared[@]}")
if [[ -n $bad ]]; then echo "Mac-only imports in shared sources:"; echo "$bad"; exit 1; fi
xcrun swiftc -typecheck -swift-version 5 -module-name Cicada -sdk "$(xcrun --show-sdk-path --sdk "$SDK")" "${TARGET[@]}" \
-D CICADA_IOS "${files[@]}"