xcodeの継続的インテグレーションのbotsを使ってみました。
その際のメモ
botsの特徴
- ユーザごとのアクセス制御もつけられる
- WEBでもXcodeでも結果の閲覧が可能
- CIをまわすタイミングをカスタマイズできる
- コード解析もしてくれる
botsの作り方
作り方はここを見てね(xcode5でOSがMarvericksで、OS X サーバが必要です。)
https://developer.apple.com/library/mac/documentation/IDEs/Conceptual/xcode_guide-continuous_integration/ConfigureBots/ConfigureBots.html#//apple_ref/doc/uid/TP40013292-CH9-SW1
ここからエラーが出てはまる
色々エラーが出た際にしたことを列挙
- テストターゲットの、Codeサインも変更しないとダメ
- projectsのcodesignも変更しないとダメっぽい
- http://tanakahiroki.com/?p=464
- https://blog.takezou.com/archives/1730
- 普通にprovisioning profilesをセットしてなかっただけかも
- OS Xサーバにprovisioning profilesを上げないとちゃんと動かない
No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID “9F2F3156-6380-4A91-AFA5-A68BD5781949”, however, no such provisioning profile was found.
CodeSign error: code signing is required for product type ‘Application’ in SDK ‘iOS 7.0’
この2つに悩まされて、結構時間使った
以下で解決
- http://blog.redgreenrefactor.eu/post/70650375252/developer-diaries-fixing-provisioning-and-code-signing
-
http://matt.vlasach.com/xcode-bots-hosted-git-repositories-and-automated-testflight-builds/
keychain部分がよくわからなかったけど、上記二つで解決
やったことはログインのところにある、distributionの証明書を、システムにコピーしました。
しかしまだエラー
xcodebuild: error: Failed to build workspace kokuban20131005 with scheme kokuban20131005.
Reason: Xcode cannot run using the selected device.
実機にしろってこと??
めっちゃ書いてありました。ごめんなさい
osxサーバに実機追加したらうまく行きました
http://matt.vlasach.com/xcode-bots-hosted-git-repositories-and-automated-testflight-builds/
と思ったけど違う。
テスト対象のデバイスをbotsの設定で選べる(作成時にも選べる)ので、そこでシミュレータも選択すればいい。
シミュレータでやる場合
Error opening /var/teamsserver/Library/Logs/iOS Simulator/iOS Simulator.log
のエラーログをはくので、フォルダ作って取り急ぎ、777の権限で動いた
多分ダメだと思うので、ベストプラクティス教えてください
そうすればシミュレータも動く。ただ、相変わらず実機は動かず。。。
command /usr/bin/codesign failed with exit code 1