Command xcodebuild failed with exit code 66


#1

I am trying to setup my MacBook, so I can develop NativeScript apps for iOS. My app is pretty basic, and runs on my Dell laptop environment. I cloned my project on my MacBook, where I’d previously installed XCode, Node, NativeScript, etc. (I can create and run hello world on the MacBook).

When I try tns emulate ios in bash, or via ‘Launch on iOS’ in Visual Studio Code, I get the same error: Command xcodebuild failed with exit code 66. It also goes on to tell me that …/platforms/ios/spsequipment.xcodeproj does not exist. Here’s what I have tried:

  • tns doctor (it ran for awhile and did a ton of stuff)
  • sudo npm install xcodeproj (quick but it seemed to do something)
  • sudo gem install xcodeproj

The error still appears. I’ve closed out and re-opened bash, as well as Visual Studio Code. What is causing this? I’m assuming there’s something environmental I need to install or set…but I don’t have the basic knowledge to figure it out and Googling the error turns up answers related to cordova, etc. I’m lost.


#2

Well, I am not sure why, but I seem to have fixed it myself! I deleted the ios folder under /platforms/ and ‘Launched on iOS’. This reinstalled the platform stuff and now my app runs! I am happy, but it would be good to know what happened here.


#3

Hah that’s what I was going to recommend. When in doubt, blow away platforms!


#4

When you cloned the project to your macbook you likely didn’t pull down all the files you need to run a nativescript app. Which is good :slight_smile:because you typically don’t want or need to store node_modules, platforms, hooks, or libs folders on the source control repo. That’s likely why you didn’t have that file under the platforms folder. So simple question, do you store platforms on your source control?
@webstera