Code signing framework fails when distributing for Enterprise in Xcode 10

Viewed 13140

I am trying to distribute an app for Enterprise, and keep getting this error (after selecting the Provisioning Profile):

enter image description here

Digging into the logs reveal this:

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.

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

4 Answers

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. You added your frameworks as Linked (not Embedded)

  2. You have Run script phase in your Build phases: enter image description here

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

remove carthage frameworks from "Link Binary With Libaries" section fix same issue on my project

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。

Related