2011-09-20 4 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/ - 그럼 맥이

명령 줄에서 응용 프로그램을 실행하려면이 명령 실행에 USB를 통해 아이폰 장치를 연결 :

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에는 한 줄만 있습니다. - var target = UIATarget.localTarget();

이 mus 명령 줄을 사용하여 장치에서 응용 프로그램을 시작할 수 있습니다.

+2

우와, 내가 본 적이 악기 : 그것을 사용하는 방법의 예는 다음 npm install -g ios-deploy

:

런타임을 설치하려면 . 장비 식별자를'-w '와 함께 사용하는 방법이 있습니까? – jww

+0

@noloader +1 장치 ID를 나열하는 방법에 대해 알고 싶습니다. –

+1

Fruitstrap (링크가 사용하는 것)은 이제 버리고 iOS 7에서는 작동하지 않습니다. ( – sheeptest

12

Fruitstrap은 더 이상 최신 프로젝트 체크 아웃을 위해 ios-deploy이라는 PhoneGap의 포크가 유지되지 않습니다. - 한 장치에 응용 프로그램 또는 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

나는 그것을 믿을 수 없다. 그것은 즉시 작동한다. 설정은 필요 없다. –

관련 문제