[问题] test/build 错误
defnngj opened this issue · 1 comments
defnngj commented
- Xcode 13.1
- iOS 15.2
2022-01-04 16:20:05.569808+0800 FastbotRunner-Runner[311:6031] Running tests...
2022-01-04 16:20:05.669111+0800 FastbotRunner-Runner[311:6031] 未能载入软件包“FastbotRunner”,因为它已损坏或丢失必要的资源。 请尝试重新安装软件包。
2022-01-04 16:20:05.669213+0800 FastbotRunner-Runner[311:6031] (dlopen_preflight(/var/containers/Bundle/Application/000507C4-AA0F-4EB9-8D1D-01467B476FCC/FastbotRunner-Runner.app/PlugIns/FastbotRunner.xctest/FastbotRunner): Library not loaded: @rpath/FastbotLib.framework/FastbotLib
Referenced from: /var/containers/Bundle/Application/000507C4-AA0F-4EB9-8D1D-01467B476FCC/FastbotRunner-Runner.app/PlugIns/FastbotRunner.xctest/FastbotRunner
Reason: no suitable image found. Did find:
/private/var/containers/Bundle/Application/000507C4-AA0F-4EB9-8D1D-01467B476FCC/FastbotRunner-Runner.app/PlugIns/FastbotRunner.xctest/Frameworks/FastbotLib.framework/FastbotLib: code signature in (/private/var/containers/Bundle/Application/000507C4-AA0F-4EB9-8D1D-01467B476FCC/FastbotRunner-Runner.app/PlugIns/FastbotRunner.xctest/Frameworks/FastbotLib.framework/FastbotLib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
/private/var/containers/Bundle/Application/000507C4-AA0F-4EB9-8D1D-01467B476FCC/FastbotRunner-Runner.app/PlugIns/FastbotRunner.xctest/Frameworks/FastbotLib.framework/FastbotLib: code signature in (/private/var/containers/Bundle/Application/000507C4-AA0F-4EB9-8D1D-01467B476FCC/FastbotRunner-Runner.app/PlugIns/FastbotRunner.xctest/Frameworks/FastbotLib.framework/FastbotLib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
/private/var/containers/Bundle/Application/000507C4-AA0F-4EB9-8D1D-01467B476FCC/FastbotRunner-Runner.app/PlugIns/FastbotRunner.xctest/Frameworks/FastbotLib.framework/FastbotLib: code signature in (/private/var/containers/Bundle/Application/000507C4-AA0F-4EB9-8D1D-01467B476FCC/FastbotRunner-Runner.app/PlugIns/FastbotRunner.xctest/Frameworks/FastbotLib.framework/FastbotLib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.)
defnngj commented
找到了解决办法:
给依赖的框架签名.
codesign -f -s "Apple Development: you email" /Users/path/github/Fastbot_iOS/Fastbot-iOS/fastbot/FastbotLib.framework/FastbotLib
- 替换你的签名邮箱
- 替换框架在项目中的路径