9

I am trying to install APPIUM on my machine and want to run it in actual device, for that i have to install the command 'npm install -g ios-deploy' but when i am trying to install it is dispalying the error.

Error:

he following build commands failed: PhaseScriptExecution Run\ Script build/ios-deploy.build/Release/ios-deploy.build/Script-C0CD3D981F59D20100F954DB.sh

(1 failure) npm ERR! code ELIFECYCLE npm ERR! errno 65 npm ERR! ios-deploy@1.9.2 preinstall: ./src/scripts/check_reqs.js && xcodebuild npm ERR! Exit status 65 npm ERR! npm ERR! Failed at the ios-deploy@1.9.2 preinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/synerzip/.npm/_logs/2018-07-21T10_30_21_090Z-debug.log syn-macmini-03:~ synerzip$ xcodebuild xcodebuild: error: The directory /Users/synerzip does not contain an Xcode project.

Solution Tried:

  1. sudo npm install -g ios-deploy
  2. npm install -g ios-deploy --unsafe-perm=true
  3. npm install -g ios-deploy --allow-root

Details:

OS: 1.13.6

xcode version: 9.4.1

node version: v10.7.0

Note when i run the command 'xcode-select --print-path' following path display, "/Applications/Xcode.app/Contents/Developer"

Can Any help me on this.

Thanks.

Girish
  • 885
  • 1
  • 10
  • 23

7 Answers7

56

I have tried the following steps sequentially and it works for me.

  1. sudo npm uninstall -g ios-deploy
  2. brew install ios-deploy

@Paul - Thanks for looking in it.

Girish
  • 885
  • 1
  • 10
  • 23
  • 1
    The Homebrew and npm versions will be updated at the same time going forward. To use ios-deploy as a command-line tool it is recommended you now install it directly via Homebrew(and if you have already installed it via npm to uninstall it). https://github.com/ios-control/ios-deploy#installation – Gabe Jan 03 '20 at 15:23
2

To use ios-deploy as a command-line tool it is recommended you now install it directly via Homebrew(and if you have already installed it via npm to uninstall it).

https://github.com/ios-control/ios-deploy#installation

The Homebrew and npm versions will be updated at the same time going forward.

Gabe
  • 2,279
  • 1
  • 23
  • 22
1

I have Fixed it with following STEPS... (Ignore steps if you have already done it)

Debug on real iOS device iONIC App

  1. Install brew( with command on terminal ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”)

  2. Install Xcode

  3. Run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

  4. Install iOS-deploy (brew install ios-deploy)

  5. Build iOS with ionic cordova build ios --buildFlag="-UseModernBuildSystem=0"

  6. Go to Xcode and set provisioning profile certificate

  7. Attach device and run command on terminal ionic cordova run ios --buildFlag="-UseModernBuildSystem=0"

  8. First it will fail as you need to Go to setting—>General -.>Device management->Click on your development certificate->Trust.

  9. Done now you can run your ionic app on your real iOS device directly with just ionic cordova run ios --buildFlag="-UseModernBuildSystem=0"

Cheers!!!!!!!!!

1

I'm running Xcode and Xcode-beta (only Xcode can deploy to appstore at the moment), so I've been switching between the two. Cleaning the build folder seemed to remove this error for me:

error Failed to install the app on the device because we couldn't execute the "ios-deploy" command. Please install it by running "npm install -g ios-deploy" and try again.

Cody Moniz
  • 4,845
  • 3
  • 22
  • 20
0

I could fix the problem by installing the "Xcode 10 beta 4" on my computer. Another solution is provided on GitHub - check out the following links.

0

After the below command

$ npm uninstall -g ios-deploy

You should restart your command line. And than you can run below line on command line.

$ brew upgrade ios-deploy
Emre Gürses
  • 1,992
  • 1
  • 23
  • 28
0

For me, the issue was that I was trying to run the app on simulator while I had a physical iOS device plugged in. Removing the device allowed the build to complete successfully

Tobilashy
  • 41
  • 5
  • This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/34904913) – Ben A. Sep 01 '23 at 22:29