2011-09-20 8 views
20

私はxcodebuild install -alltargets -iphoneos4.2 -activeconfiguration provisioning_profile=path_of_my_provisioningprofile code_sign_identity=identityを使用しています。 このコマンドは自分のアプリをビルドしており、ビルドファイル(.app)も取得しています。 しかし、コマンドラインからデバイスにアプリをインストールする方法。 この問題で私を助けてください。iphoneデバイスにコマンドラインでアプリケーションをインストール

答えて

4

使用この美しいスクリプト:http://gamua.com/blog/2012/03/how-to-deploy-ios-apps-to-the-iphone-via-the-command-line/ - 次にコマンドライン上でアプリを起動するには、このコマンドを

を実行しているMacにUSB経由でiPhoneのデバイスを接続します

instruments -w 4xxxxxxxx9 -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate NITC -e UIASCRIPT Launch-App.js 

形式:instruments -w <deviceid> -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate <applicationname> -e UIASCRIPT Launch-App.js

マイ打ち上げ-App.jsには1行しかありません - var target = UIATarget.localTarget();

コマンドラインを使用してデバイス上でアプリケーションを起動するには十分である。

+2

おっと、私は見たことがない楽器:それを使用する方法のいくつかの例がある。ここnpm install -g ios-deploy

は、実行をインストールするには。機器IDに '-w'で使用されている機器のリストを表示する方法はありますか? – jww

+0

@noloader +1デバイスのIDを表示する方法については、私は知りたいです。 –

+1

Fruitstrap(リンクが使用しているもの)は放棄され、iOS 7では動作しません:( – sheeptest

2

周りを見て回るhttps://github.com/benvium/libimobiledevice-macosx。これはlibimobiledeviceからMAC-OS Xへのポートです。その非常に便利でジェイルブレイクが必要です。 :より多くの日付のプロジェクトのチェックアウトまでのPhoneGapによってフォークがios-deployと呼ばれるためにP

+1

ありがとう@santiagoRodriguez:p –

12

Fruitstrapはもはや維持されません。 - 1デバイスにアプリケーションまたはIPAを押すと述べた

// deploy and debug your app to a connected device 
ios-deploy --debug --bundle my.app 

// deploy and launch your app to a connected device, but quit the debugger after 
ios-deploy --justlaunch --debug --bundle my.app 

// deploy and launch your app to a connected device, quit when app crashes or exits 
ios-deploy --noninteractive --debug --bundle my.app 

// Upload a file to your app's Documents folder 
ios-deploy --bundle_id 'bundle.id' --upload test.txt --to Documents/test.txt 
+0

ありがとう!私は、iOS 9.3.1とOS X 10.11.3を使用して動作するセットアップを得ました。 – Jespertheend

+3

時代遅れの世界。乾杯! – mix3d

+0

私はそれを信じていません。 –

関連する問題