nativescript-cli: Error while building for iOS: 'pod install' command failed.

Environment Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 6.3
  • Cross-platform modules: 6.3.0
  • Android Runtime: 6.3.0
  • iOS Runtime: 6.3.0
  • Plugin(s): none

Describe the bug After updating to MacOS Catalina, I wanted to test out a nativescript app. I created a brand new nativescript project from the default template with typescript. Then when I try to run or build, I get the error:

'pod install' command failed.

I ran tns doctor and no problems exist. After the error, in order to troubleshoot, I’ve updated homebrew, node, cocopods, and ran pod repo update. Nothing helps so far.

To Reproduce I can easily reproduce on my machine by creating another new project.

Expected behavior Project should build

Sample project Hello world project created from scratch

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 20 (7 by maintainers)

Most upvoted comments

@alexziskind1 I tried it with 6.3.0, and had no issues.

Can you try this, Goto platforms/ios folder in your terminal and run pod install When I did that, I go something like this Screenshot 2019-12-24 at 8 34 06 AM

And after that, it was all smooth sailing for me.

☝🏻👏🏻 💯 tns build ios fails on pod install: Error: 'pod install' command failed. I found a solution, but cannot retrieve where. Sorry to the original poster, and I am not to be credited…

→ prefix pod commands with arch -x86_64, e.g.: arch -x86_64 pod install

In a nutshell:

  1. run tns build ios
  2. it will 💥 on pod install : Error: 'pod install' command failed.
  3. do as @alexziskind1 said, i.e.: goto platforms/ios folder in your terminal and run arch -x86_64 pod install

(this is due to the ffi module, used by pod, not being ported on M1)

Yes, this issue is reproducible with just Xcode and a Podfile. I’ve opened a ticket on the cocoapods repo as you suggested and they also were surprised to see this. https://github.com/CocoaPods/CocoaPods/issues/9476 However, it seems that after following their suggestion to update to the 1.9 beta, everything is working again.

@alexziskind1 I tried it with 6.3.0, and had no issues.

Can you try this, Goto platforms/ios folder in your terminal and run pod install When I did that, I go something like this Screenshot 2019-12-24 at 8 34 06 AM

And after that, it was all smooth sailing for me.

That did it. No idea what happened with cli version but thank you very much for your help! Funny how a coincidence of a recent macOS update and this error led me down a wrong path =) All the best!