Reputation: 237
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.
Upvotes: 22
Views: 32984
Reputation: 2058
If you're writing a Flutter app, follow these instructions at flutter.dev to set up your IDE of choice (including setting up your signing key in XCode). After you have it working in an IDE, you can then build and launch the app on a connected device by these steps:
flutter devices
and copy the hex string listed in the second column.flutter -d DEVICE_ID run --release
(or change --release
to --debug
to build and deploy the debug version).The flutter command will handle spawning XCode to compile the app. It will not run any faster than XCode usually does (in my experience.)
Be sure to keep the device connected to your mac, whether via a USB cable, or over a shared wireless network.
Upvotes: 0
Reputation: 51
Install following packages on MAC
brew install libimobiledevice
brew install ideviceinstaller
After successfully installed above packages.
Use following command to install .ipa file on iOS devices:
ideviceinstaller -i <Path_to_your_ipa>
Thanks
Upvotes: 1
Reputation: 218
ipatool: https://github.com/majd/ipatool
Step 1: Search the app bundle id
./ipatool search testflight --limit 1
> ==> ℹ️ [Info] Searching for 'testflight' using the 'US' store front...
> ==> ℹ️ [Info] Found 1 result:
> 1. TestFlight: com.apple.TestFlight (3.1.0).
Step 2: Download the IPA
./ipatool download --bundle-identifier com.apple.TestFlight
Easy!
Upvotes: 1
Reputation: 2752
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
Upvotes: 20
Reputation: 318
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
Upvotes: 5
Reputation: 654
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
Upvotes: 4
Reputation: 654
What about this:
how to intall an ipa/app file into iPhone with command line?
Third solution with libimobiledevice.
Upvotes: 2
Reputation: 551
Fruitstrap: https://github.com/ghughes/fruitstrap
Here's a good tutorial to set it up: http://sgleadow.github.com/blog/2011/11/05/installing-ios-apps-on-the-device-from-the-command-line/
Upvotes: 6