実機にインストールしたiPhoneアプリをコマンドラインから起動する
iPhoneアプリ開発時に、テスト自動化をしようとすると、アプリの自動起動が必要になります。
Xcode 4.4までは、
instruments -t /Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w <デバイスID/対象シミュレータ> <アプリ名>.app
Xcode 4.5からはInstrumentsのテンプレートの場所が変わりました。
<Xcode.appまでのパス>/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate
よって以下のようにすると、起動することができます。
instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w <デバイス identifier/対象シミュレータ> <アプリ名>.app