在天朝想要下載webRTC最簡單的方法就是使用別人搭建好的鏡像,推薦一個下載地址:webrtc.org.cn/mirror/ios
這是下載好的源碼位置 web
1.首先要安裝谷歌的depot_tool工具xcode
hrrmacdeair:src hrrmac$ cd /Users/hrrmac/Desktop/qq
hrrmacdeair:qq hrrmac$ export WORKSPACE=`pwd`
hrrmacdeair:qq hrrmac$ cd $WORKSPACE/depot_tools
hrrmacdeair:depot_tools hrrmac$ chmod +x $WORKSPACE/depot_tools/cipd
hrrmacdeair:depot_tools hrrmac$ export PATH=$PATH:$WORKSPACE/depot_tools
hrrmacdeair:depot_tools hrrmac$
複製代碼
2.找到webRTC的src目錄bash
hrrmacdeair:qq hrrmac$ cd /Users/hrrmac/Desktop/qq/webrtc/src
複製代碼
3.執行命令ide
hrrmacdeair:src hrrmac$ gn gen out/iOS_64 --args='target_os="ios" target_cpu="arm64"' --ide=xcode
複製代碼
4.最後便可找到文件工具
5.運行demo ui