LoginSignup
7
5

More than 5 years have passed since last update.

fastlaneでcodesignに失敗する場合

Last updated at Posted at 2019-02-26

iMacをjenkinsスレーブとしてReact Nativeアプリのビルドをしている最中に以下のエラーでハマりました。

The following build commands failed:
CodeSign /パス
(1 failure)
[15:22:32]: Exit status: 65

+---------------+-------------------------+
|            Build environment            |
+---------------+-------------------------+
| xcode_path    | /Applications/Xcode.app |
| gym_version   | 2.97.0                  |
| export_method | development             |
| sdk           | iPhoneOS12.1.sdk        |
+---------------+-------------------------+

[15:22:32]: ▸     /usr/bin/codesign --force --sign XXXXXXX --preserve-metadata=identifier,entitlements,flags --timestamp=none /パス
[15:22:32]: ▸ /パス: replacing existing signature
[15:22:32]: ▸ /パス: errSecInternalComponent
[15:22:32]: ▸ Command CodeSign failed with a nonzero exit code

解決方法は使用する証明書や秘密鍵をcodesignやxcodeからパスワード入力無しで使用できるようにすることです。
キーチェーンアプリの対象の秘密鍵をダブルクリック→アクセス制御→常に許可するリストに /usr/bin/codesignxcode を追加します。
すると正常に署名できるようになりました。

参考
https://stackoverflow.com/questions/29242485/command-usr-bin-codesign-failed-with-exit-code-1-code-sign-error

7
5
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
7
5