How to install iOS application from src, .app, or .ipa via command line to hardware device
-
21-12-2019 - |
Question
For test automation (GUI test, not XCUnitTest) purposes, I need to install an iOS app onto a physical hardware device.
I'm looking for:
- a replacement to Fruitstrap (it has been abandoned)
- or a way to perform XCode's "Build & Run" action on a target device
I've tried:
using
xcodebuild
and pointing the-destination
argument at the target device and providing build actions ofclean
andinstall
It finds the target device and begins cleaning and then installing.
At the end of all the files being compiled and the app being signed, I get a success message
** INSTALL SUCCEEDED **
But, alas, no app is installed on my phone.
This is my full xcodebuild command:
xcodebuild
-destination platform=iOS,id=######## \
clean install
Creative suggestions welcome.
I'm considering writing an applescript if needed, but wish there was a better way.
Solution
Fruitstrap is, for the time being, working and installing the app correctly.
/path/to/fruitstrap \
install -id ##udid### \
--bundle "/Users/#######/path/to/application.ipa"
Other, more maintained solutions are still welcome.
Limitations:
- Need to have a prebuilt .ipa file
- Target device must be signed with a provisioning profile that includes the target device's udid