在 Xcode 10 中为 Enterprise 分发时代码签名框架失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/52436575/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Code signing framework fails when distributing for Enterprise in Xcode 10
提问by Khanh Nguyen
Hi guys I am trying to distribute an app for Enterprise, and keep getting this error (after selecting the Provisioning Profile):
大家好,我正在尝试为企业分发应用程序,并且不断收到此错误(在选择配置文件后):
Digging into the logs reveal this:
深入研究日志揭示了这一点:
2018-09-21 04:14:07 +0000 Running /usr/bin/codesign '-vvv' '--force' '--sign' '2D44419C65EF2B7301F0646133CC88C2C6A3E697' '--entitlements' '/var/folders/xj/stm8l48s1nq9320sfh3ytw140000gn/T/XcodeDistPipeline.IsE/entitlementsycy5yP' '--preserve-metadata=identifier,flags,runtime' '/var/folders/xj/stm8l48s1nq9320sfh3ytw140000gn/T/XcodeDistPipeline.IsE/Root/Payload/Fleet UAT.app/Frameworks/AppAuth.framework'
2018-09-21 04:14:07 +0000 /var/folders/xj/stm8l48s1nq9320sfh3ytw140000gn/T/XcodeDistPipeline.IsE/Root/Payload/Fleet UAT.app/Frameworks/AppAuth.framework: replacing existing signature
2018-09-21 04:14:07 +0000 /var/folders/xj/stm8l48s1nq9320sfh3ytw140000gn/T/XcodeDistPipeline.IsE/Root/Payload/Fleet UAT.app/Frameworks/AppAuth.framework: code object is not signed at all
2018-09-21 04:14:07 +0000 /usr/bin/codesign exited with 1
2018-09-21 04:14:07 +0000 Running /usr/bin/codesign '-vvv' '--force' '--sign' '2D44419C65EF2B7301F0646133CC88C2C6A3E697' '--entitlements' '/var/folders/xj/stm8l48s1nq9320sfh3ytw140000gn/T/XcodeDistPipeline.IsE/entitlementsycy5yP' '--preserve-metadata=identifier,flags,runtime' '/var/folders/xj/stm8l48s1nq9320sfh3ytw140000gn/T/XcodeDistPipeline.IsE/Root/Payload/Fleet UAT.app/Frameworks/AppAuth.framework'
2018-09-21 04:14:07 +0000 /var/folders/xj/stm8l48s1nq9320sfh3ytw140000gn/T/XcodeDistPipeline.IsE/Root/Payload/Fleet UAT.app/Frameworks/AppAuth.framework: replacing existing signature
2018-09-21 04:14:07 +0000 /var/folders/xj/stm8l48s1nq9320sfh3ytw140000gn/T/XcodeDistPipeline.IsE/Root/Payload/Fleet UAT.app/Frameworks/AppAuth.framework: code object is not signed at all
2018-09-21 04:14:07 +0000 /usr/bin/codesign exited with 1
Similar issue happens to all frameworks used by the project. These frameworks were added using Carthage.
项目使用的所有框架都会发生类似的问题。这些框架是使用 Carthage 添加的。
This started happening after I upgraded to Xcode 10 & Carthage 0.30.1 (I was using 0.16.x previously).
在我升级到 Xcode 10 & Carthage 0.30.1(我之前使用的是 0.16.x)之后,这开始发生。
回答by lobstah
When you are adding frameworks using Carthage you need to follow some steps in order to make it work properly. Here is a tutorial: https://www.raywenderlich.com/416-carthage-tutorial-getting-started
当您使用 Carthage 添加框架时,您需要遵循一些步骤才能使其正常工作。这是一个教程:https: //www.raywenderlich.com/416-carthage-tutorial-getting-started
In your case make sure, that:
在您的情况下,请确保:
You added your frameworks as
Linked
(notEmbedded
)You added paths (Input Files) for all your Carthage frameworks
回答by Matt W.
I was able to fix this issue by changing the target's build setting "Build Active Architecture only" to "Yes" then romoving "i386" from the "Valid Architectures". I found my solution here: https://github.com/Carthage/Carthage/issues/1771
我能够通过将目标的构建设置“仅构建活动架构”更改为“是”然后从“有效架构”中删除“i386”来解决此问题。我在这里找到了我的解决方案:https: //github.com/Carthage/Carthage/issues/1771
回答by Xingou
I had such a problem a few days ago. the The problem is related to your framework,it may be damaged。 you can download or generate a new one。That solves my problem。
几天前我遇到了这样的问题。该问题与您的框架有关,可能已损坏。您可以下载或生成一个新的。解决了我的问题。