Github仓库地址:https://github.com/overtake/TelegramSwift

使用的是默认的分支的当前最新版本。遇到的问题包括下面几种, 目前有一些解决办法,不过开发者似乎无心解决,只能暂时使用这些手动修复的步骤。

子模块无法克隆,这是因为子模块使用了ssh协议,把.gitmodules文件中的URL修改成HTTP协议的格式,然后git submodule sync更新一下仓库缓存,接着git submodule update --init --recursive就可以克隆子模块了。

webrtc遇到错误,crc32c_config.h.in does not exist.`。这个错误很奇怪,在issues中找到的一个办法是https://github.com/overtake/TelegramSwift/issues/889#issuecomment-1384436418

cd submodules/
git clone https://github.com/TelegramMessenger/tgcalls
cd ../
rm -rf core-xprojects/webrtc/build
cd submodules/tg_owt
git submodule update --init --recursive
cd ../../
sh scripts/configure_frameworks.sh

最后使用xcodebuild -scheme Release build -configuration Release编译的时候最后报错

The following build commands failed:
        Copy /Users/myaccount/Library/Developer/Xcode/DerivedData/Telegram-bmlinwjimotatddxjuxkxfphyrqa/Build/Products/Release/Telegram.app/Contents/Frameworks/Sparkle.framework /Users/myaccount/Library/Developer/Xcode/DerivedData/Telegram-bmlinwjimotatddxjuxkxfphyrqa/Build/Products/Release/Sparkle.framework (in target 'Telegram' from project 'Telegram')

在sparkle中重新git submodule update --init --recursive更新仓库。