CORDOVA IOS - Error Promise Rejected when I build
Asked Answered
M

2

5

I got my error when I tried to build my first iOS Cordova App. By using this command :

sudo cordova build ios --device

Here what my terminal output:

CordovaError: Promise rejected with non-error: 'xcode-select: error: tool \'xcodebuild\' requires Xcode, but active developer directory \'/Library/Developer/CommandLineTools\' is a command line tools instance\n' at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:30:15) at process._tickCallback (internal/process/next_tick.js:68:7)

What this is error is all about? How do I solve it?

Thank you very much! Regards,

Daksamedia

Meeks answered 17/3, 2019 at 1:38 Comment(2)
#41117084Morava
Please refer to this link . #41117084Morava
H
1

if you're facing this error and you installed XCode already, All you have to do is to...

  • Open XCode
  • Go To Xcode > Preferences > Locations
  • From the Command Line Tools Select your XCode enter image description here
Hulton answered 20/7, 2022 at 19:4 Comment(0)
D
28

I had similar issue when running ionic cordova build ios --prod. Well to solve this issue there some stuffs have to check:

First make sure you have Xcode Installed with command line tools also If you have Xcode installed already check the version and your mac version to download the right command line tools. Download the command line tools here Command Line Tools After install it and run this command to fix the xcode-select path

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

After this run the command again. Am sure this will work for you

Dante answered 19/3, 2019 at 22:55 Comment(2)
After downloading the "Command Line Tools" running this command resolved my error with Cordova deploying to an iOS Simulator for my Quasar (vueJS) mobile app.Mastin
Fixed my issue too. Although I was still able to build and run within XCode before, it is certainly more convenient to be able to do so directly from the command line.Lymph
H
1

if you're facing this error and you installed XCode already, All you have to do is to...

  • Open XCode
  • Go To Xcode > Preferences > Locations
  • From the Command Line Tools Select your XCode enter image description here
Hulton answered 20/7, 2022 at 19:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.