Unable to archive project

332 views Asked by At

I am unable to archive my Swift project. When it's archiving, it fails at 90% of the progress. Showing the following error.

enter image description here

The project runs well in the simulator and on my device. But suddenly i am getting this error when archiving... It all worked well before.. Does anyone have any idea?

2

There are 2 answers

2
Arnaud Wurmel On BEST ANSWER

I got this problem with cocoapods, you should edit the file "YourTarget-framework.sh" in Pods > Target Support Files > Pods-Your Target.

You need to locate this line: local code_sign_cmd="/usr/bin/codesign --force --sign {EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1""

Replace it by : local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '"$1"'"

0
clemens On

The path to the binary contains spaces ([...]/ArchiveIntermediates/Trusti - Release/[...]). This should be the problem. The error message displays the path cut before the first space.

I think you should use another product name, and adapt it in InfoPlist.strings if necessary.