Telegram 一款加密聊天软件,因为工作接触到,然后想研究下源码。结果run的时候各种问题,记录下如何成功的run起来。
准备工作
- 源码: Git Address 😄
Start
[submodule "submodules/AsyncDisplayKit"]
path = submodules/AsyncDisplayKit
url = https://github.com/peter-iakovlev/AsyncDisplayKit.git
[submodule "submodules/Display"]
path = submodules/Display
url= https://github.com/peter-iakovlev/Display.git
[submodule "submodules/HockeySDK-iOS"]
path = submodules/HockeySDK-iOS
url = https://github.com/peter-iakovlev/HockeySDK-iOS.git
[submodule "submodules/libtgvoip"]
path = submodules/libtgvoip
url= https://github.com/grishka/libtgvoip.git
[submodule "submodules/lottie-ios"]
path = submodules/lottie-ios
url= https://github.com/peter-iakovlev/lottie-ios.git
[submodule "submodules/MtProtoKit"]
path = submodules/MtProtoKit
url= https://github.com/peter-iakovlev/MtProtoKit.git
[submodule "submodules/Postbox"]
path = submodules/Postbox
url= https://github.com/peter-iakovlev/Postbox.git
[submodule "submodules/SSignalKit"]
path = submodules/SSignalKit
url = https://github.com/peter-iakovlev/Signals.git
[submodule "submodules/TelegramCore"]
path = submodules/TelegramCore
url= https://github.com/peter-iakovlev/TelegramCore.git
[submodule "submodules/TelegramUI"]
path = submodules/TelegramUI
url= https://github.com/peter-iakovlev/TelegramUI.git
[submodule "submodules/ffmpeg"]
path = submodules/ffmpeg
url= https://github.com/peter-iakovlev/ffmpeg.git
[submodule "submodules/LegacyComponents"]
path = submodules/LegacyComponents
url= https://github.com/peter-iakovlev/LegacyComponents.git
3.修改完成,打开终端 cd 到项目的路径,输入命令,就需要耐心的等待所有的子项目clone完成,因为我的网比较慢,所以还是需要一点点时间的。😄
git submodule sync
git submodule update --init --recursive
运行成功后,如下图:5.接下来就可以run project了,要选择 Telegram-iOS Fork scheme,不然会报这种错误:
*.xcconfig file in Telegram-iOS include Telegram-iOS-Shared ***
6.跑工程时间还是比较长的 ,等一下就跑起来了,铛铛铛!!!ps. 运行工程的中间报了两个错误,顺便贴上来,为碰到同样问题的人解惑。
- ffpeg yams not found:
Run in Terminal app:
1.ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
2.brew install yasm
*gas-preprocessor.pl not found:
- Download gas-preprocessor.pl file
- copy the file gas-preprocessor.pl into /usr/local/bin