webrtc_ios 编译
0.命令行git 代理
git config --global http.https://github.com.proxy https://127.0.0.1:8889
git config --global https.https://github.com.proxy https://127.0.0.1:8889
取消,
git config --global --unset http.proxy
git config --global --unset https.proxy
当前终端设置全局代理
export http_proxy=http://127.0.0.1:8889
export https_proxy=$http_proxy
1.下载 depot_tools
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH="$PATH:xxxxxx/depot_tools"
2.下载webrtc
export GYP_DEFINES="OS=ios"
fetch --nohooks webrtc_ios
gclient sync -r b484ec0082948ae086c2ba4142b4d2bf8bc4dd4b --force
gclient sync
用这个能指定commit
3.生成工程
gn gen out_ios/Debug-iphoneos --ide="xcode" --args='target_os="ios" target_cpu="arm64" '
似乎xcode 12跑不过,我用Xcode11.5跑的
遇到报错1:
Automatic code signing identity selection was enabled but could
not find exactly one code signing identity matching
iPhone Developer. Check that your keychain
is accessible and that there is a valid code signing identity
listed by `xcrun security find-identity -v -p codesigning`
xcrun security find-identity -v -p codesigning 能看到列表
1) x x x x x x x x x x x x x x x x x x x x "Apple Development: xxxx (xxxxx)"
1 valid identities found
然后修改命令
gn gen out_ios/Debug-iphoneos --ide="xcode" --args='target_os="ios" target_cpu="arm64" ios_code_signing_identity = "x x x x x x x x x x x x x x x x x x x x"'
ninja -C out_ios/Debug-iphoneos
在工程文件的 general tab 中,手动选择 Info.plist
为 src/examples/objc/AppRTCMobile/ios/Info.plist