Code signing .framework failed – Xcode


This issue occurs when you are uploading your app to the iTunes store using Xcode. In this app, a framework (or SDK) was implemented. The app works when you are debugging. However, during the upload process, an error appears that states, “Code signing “…framework” failed. View distribution logs for more information.

Code signing “.framework” failed” error message in Xcode.


There is a fix! There is a Unix shell script that will strip the framework of the Simulator architecture. In Xcode, click on your project then click “Build Phases” button.

Click Build Phases.

In the Build Phases window, click the “Plus” sign and click “Create Run Script Phase

Click New Run Script Phase.

Open the Run Script arrow to open.

Open the Run Script tab.

Copy the script (under the Script section) and paste the script in the script box (that will strip the framework of the Simulator architecture ).

Script box

Unix Shell Script

This Unix shell script (for Xcode) loops through the frameworks embedded in the application and removes unused architectures. Copy the code below. After you copy and paste the code, make sure to change the FRAMEWORK_NAME (name of the framework).

After pasting the source code, the screen should look like this.

Script that was pasted inside the script box.

Run the project by pressing the “Play” button (top left-corner) or on your keyboard, press COMMAND and R at the same time.

Xcode Version

Xcode version 10.3 (10G8)

Xcode 10.3 (10G8)

Extra Reference from Stack Overflow

%d bloggers like this: