在天朝想要下载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