install application in iphone device through comma

2019-01-22 19:02发布

I'm using xcodebuild install -alltargets -iphoneos4.2 -activeconfiguration provisioning_profile=path_of_my_provisioningprofile code_sign_identity=identity. This command is building my app and i am getting build file (.app) also. But how to install the app in to device from command line. Please help me in this issue.

5条回答
啃猪蹄的小仙女
2楼-- · 2019-01-22 19:32

Looking around found https://github.com/benvium/libimobiledevice-macosx. This is a port from libimobiledevice to MAC-OS X. Its very useful and no jailbroken is needed. :P

查看更多
劳资没心,怎么记你
3楼-- · 2019-01-22 19:41

What about this:

how to intall an ipa/app file into iPhone with command line?

Third solution with libimobiledevice.

查看更多
地球回转人心会变
5楼-- · 2019-01-22 19:46

Use this beautiful script : http://gamua.com/blog/2012/03/how-to-deploy-ios-apps-to-the-iphone-via-the-command-line/ - Then connect iphone device via usb to mac running this command

To launch app on command line:

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

format : 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

My Launch-App.js has only one line - var target = UIATarget.localTarget();

This must be sufficient to launch application on device using command line

查看更多
6楼-- · 2019-01-22 19:50

Fruitstrap is no longer maintained, for a more up to date project checkout the fork by PhoneGap called ios-deploy.

To install run: npm install -g ios-deploy

Here are some examples of how to use it:

// 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
查看更多
登录 后发表回答