解决webrtc iOS 编译错误 Multiple codesigning问题

来源:互联网 发布:rf mems 知乎 编辑:程序博客网 时间:2024/06/06 01:59

经过漫长的下载webrtc代码过程,如果幸运的话(由于重所周知的原因,加上代码量大得恐怖,大部分人不会成功走到这一步。需要代码的人,请在下面留言),下载成功之后,编译也许马上报错:

AssertionError: Multiple codesigning fingerprints for identity: iPhone Developer

这个错误是由于mac os 上同时存在多个签名证书造成的。
执行:

 security find-identity

查看本机上具有多少个有效签名。有效签名为Valid identities only下面列出来的。

find . -name common.gypi | xargs grep CODE_SIGN_IDENTITY

应该看到这么几行

./chromium/src/build/common.gypi:                  'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',./chromium/src/build/common.gypi:                  'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',

将iPhone Developer 修改为我们选择的合适的签名,然后重新执行:

webrtc/build/gyp_webrtc

没有其他错误的话,成功打印:

   Updating projects from gyp files... 

之后正常结束。

由于webrtc 代码更新非常快,几个月之前的代码,放到现在,也许已经面目全非了。因此,需要根据实际情况灵活解决问题。
今天(2015年8月13日)最新的代码(本文所基于的代码)是:

 git logcommit e2a8be124458d77d0d3f30a8e33e0a1eede4a849Author: magjed <magjed@webrtc.org>Date:   Tue Aug 11 23:54:58 2015 -0700Revert of AppRTCDemo: Render each video in a separate SurfaceView (patchset #4 id:120001 of https://codereview.webrtc.org/1257043004/ )Reason for revert:AppRTCDemo often crashes in loopback mode and incorrect layout when connection is establishedBUG=webrtc:4909,webrtc:4910
0 0
原创粉丝点击