webrtc iOS 源码调试

获取源码

  1. install Chromium depot_tools

install on Linux / Mac

1
2
$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
$ export PATH=/path/to/depot_tools:$PATH
  1. fetch source code
1
2
fetch --nohooks webrtc_ios
gclient sync

生成可调试项目

Using Xcode

1
2
3
cd $src
gn gen out/ios --args='target_os="ios" target_cpu="arm64" rtc_include_tests=false' --ide=xcode
open -a Xcode.app out/ios/all.xcodeproj

选择 target AppRTCMobile 添加签名,运行

处理错误

16922434326171692243431723.png

解决方案, 修改 src/build/conifg/ios/ios_sdk.gni

1
2
# `security find-identity -v -p codesigning`.
ios_code_signing_identity_description = "Apple Development"

执行命令 security find-identity -v -p codesigning

Apple Development 改为命令给出的列表中的具体的一项, 例如

1
2
# `security find-identity -v -p codesigning`.
ios_code_signing_identity_description = "Apple Development: xiaobing yao (24ZM6UP2MW)"

之后重新执行上面的构建命令即可。


webrtc iOS 源码调试
https://yxibng.github.io/2023/05/09/webrtc/2023-05-09-webrtc-调试/
作者
yxibng
发布于
2023年5月9日
许可协议