酢ろぐ!

カレーが嫌いなスマートフォンアプリプログラマのブログ。

Xcode 5のBotsでプロビジョニングプロファイルでエラーが発生してまうので対策した

Xcode botを使い始めました。

リポジトリによってiOSシミュレータのみで解析をしていたはずなのですが実機ビルドを想定しているかのような謎のエラーが発生してしまいます。エラー野内用としては下記のようなものです。

No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID “XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX”, however, no such provisioning profile was found. CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.1'

解決策としては下記のものが参考になりました。

「/Library/Server/Xcode/Data/ProvisioningProfiles」に.mobileprovisionファイルをコピーすることで上記のエラーは回避することができるようになりました。次に証明書が見当たらないとエラーが発生しました。普通にXcodeだったらビルドできるのに……と思いつつ。

No codesigning identities found: No codesigning identities (i.e. certificate and private key pairs) that match the provisioning profile specified in your build settings (“Provisioning_XXXXXXXXXXXX”) were found. CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.1'

解決策としては下記のものが参考になりました。

こちらの対策としては、キーチェーンで「ログイン」、分類で「鍵」を選択している状態で、XXXXXXXXXXXXの秘密鍵をシステムへコピーして、Mac (Server)を再起動させました。