How to install iOS application from src, .app, or .ipa via command line to hardware device

StackOverflow https://stackoverflow.com//questions/25023882

  •  21-12-2019
  •  | 
  •  

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:

  1. using xcodebuild and pointing the -destination argument at the target device and providing build actions of clean and install

  2. It finds the target device and begins cleaning and then installing.

  3. 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

Here's the gist of the output

Creative suggestions welcome.

I'm considering writing an applescript if needed, but wish there was a better way.

有帮助吗?

解决方案

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
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top