当前位置 博文首页 > guijiewan的专栏:webrtc 编译完成,安装时错误
历尽千辛万苦,webrtc编译完成。如果能能走到这一步,那么恭喜你,你已经打败99%的人了。最后就是安装到真机上面测试,还有最后一个问题需要解决。
执行安装命令
ideviceinstaller -i out_ios/Debug-iphoneos/AppRTCDemo.app
发生错误:
Install failed.
Failed to verify code signature
错误日志
ERROR: Install failed. Got error "ApplicationVerificationFailed" with code 0xe8008016: Failed to verify code signature of <MIExecutableBundle : path = /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.Ufd0uM/extracted/AppRTCDemo.app identifier = com.google.AppRTCDemo type = 4> : 0xe8008016 (Entitlements found that are not permitted by provisioning profile)
这是由于bundleid和签名不一致引起的,如何修改过签名证书,一般回发生这个错误
webrtc 默认的bundleid 为
com.google.AppRTCDemo
存在这个文件里:
./examples/objc/AppRTCDemo/ios/Info.plist
将下面这两行里的com.google.AppRTCDemo改为合适的bundleid
<key>CFBundleIdentifier</key>
<string>com.google.AppRTCDemo</string>
重新执行脚本生成编译工程:
webrtc/build/gyp_webrtc
再执行编译 :
ninja -C out_ios/Debug-iphoneos AppRTCDemo
成功编译后执行以下命令安装app:
ideviceinstaller -i out_ios/Debug-iphoneos/AppRTCDemo.app
若能成功输出:
Uploading AppRTCDemo.app package contents... DONE.
Installing '(null)'
Install: CreatingStagingDirectory (5%)
Install: ExtractingPackage (15%)
Install: InspectingPackage (20%)
Install: TakingInstallLock (20%)
Install: PreflightingApplication (30%)
Install: InstallingEmbeddedProfile (30%)
Install: VerifyingApplication (40%)
Install: CreatingContainer (50%)
Install: InstallingApplication (60%)
Install: PostflightingApplication (70%)
Install: SandboxingApplication (80%)
Install: GeneratingApplicationMap (90%)
Install: Complete
到这里大功告成。
下一节解决Xcode工程问题。