LoginSignup
5
4

More than 5 years have passed since last update.

Xcode: codesignのunknown errorは本当にわけがわからないよ

Last updated at Posted at 2018-05-22

現象

Xcodeでビルドすると以下のようなエラーが発生する。

 /usr/bin/codesign --force --sign QWERTYUIOPASDFGHJKLL --entitlements /Users/hoge/Library/Developer/Xcode/DerivedData/Unity-iPhone-qwertyuiopasdfghjkl/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/IntermediateBuildFilesPath/Unity-iPhone.build/Release-iphoneos/Unity-iPhone.build/hoge.app.xcent --timestamp=none /Users/hoge/Library/Developer/Xcode/DerivedData/Unity-iPhone-qwertyuiopasdfghjkl/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/hoge.app
/Users/hoge/Library/Developer/Xcode/DerivedData/Unity-iPhone-qwertyuiopasdfghjkl/Build/Intermediates.noindex/ArchiveIntermediates/Unity-iPhone/InstallationBuildProductsLocation/Applications/hoge.app: unknown error -1=ffffffffffffffff
Command /usr/bin/codesign failed with exit code 1

** ARCHIVE FAILED **

対応

検索すると色々解決策が上がってはいるが…

Xcodeを再起動する

Xcodeを再起動すると解決する、事があるらしい。

DerivedDataディレクトリを空にする

/Users/hoge/Library/Developer/Xcode/DerivedData/に溜まっているデータを削除すると解決する、事があるらしい。
command/usr/bin/codesign failed with exit code 1- code sign error - Stack Overflow

cd /Users/hoge/Library/Developer/Xcode/DerivedData
xattr -rc .

キーチェーンアクセスのパスワードの更新

キーチェーンアクセスのパスワードを同じで良いので更新すると解決する、事があるらしい。
Jenkins: Command /usr/bin/codesign failed with exit code 1 - Stack Overflow
Getting this error command /usr/bin/codesign failed with exit code 1 with xcode 9.1?

Xcodeでサインインしてプロファイルを更新

Xcodeでサインインしてプロファイルを同期すると解決する、事があるらしい。
command/usr/bin/codesign failed with exit code 1- code sign error - Stack Overflow
image.png

マシンの再起動

マシンを再起動すると解決する、事があるらしい。
Install on Device give Error : Command /usr/bin/codesign failed with exit code 1 - Stack Overflow

結局、上記すべて試した結果、マシンの再起動で解決した。

5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4