本文介绍了在Xcode 10中为Enterprise分发时,代码签名框架失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我正在尝试为Enterprise分发应用程序,并不断出现此错误(在选择"Provisioning Profile"之后):

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 signature2018-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 all2018-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 signature2018-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 all2018-09-21 04:14:07 +0000 /usr/bin/codesign exited with 1

该项目使用的所有框架都有类似的问题.这些框架是使用Carthage添加的.

Similar issue happens to all frameworks used by the project. These frameworks were added using Carthage.

这是在我升级到Xcode 10&之后开始发生的迦太基0.30.1(我之前使用的是0.16.x).

This started happening after I upgraded to Xcode 10 & Carthage 0.30.1 (I was using 0.16.x previously).

推荐答案

在使用Carthage添加框架时,需要遵循一些步骤才能使其正常工作.这是一个教程: https://www.raywenderlich.com/416-carthage-入门教程

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

在您的情况下,请确保:

In your case make sure, that:

  1. 您将框架添加为Linked(不是Embedded)

在构建阶段中,您具有Run script阶段:

You have Run script phase in your Build phases:

您为所有迦太基框架添加了路径(输入文件)

You added paths (Input Files) for all your Carthage frameworks

这篇关于在Xcode 10中为Enterprise分发时,代码签名框架失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-11 04:32