2

I'm on Xcode 10.1. Whenever I 'pod install' anything on my current project, I get this

Command CompileSwift failed with a nonzero exit code

Because of that I'm not able to build anything or some useful 3rd party libraries. Did hours of digging and found out that many people were suffering off this bug.

Tried all the approach but none seem to work. Is this a common Xcode problem and when does this error occur. I have worked with pod on numerous occasion but never seen this error.

Appreciate the help.

7
  • The same problem happened with me. I did find a strange solution (I think it is a solution), for some reason when I make the Xcode project title's name a bit shorter it seems to work (under 12 characters). Give this a try, for some reason it worked with me. Commented Jan 14, 2019 at 23:07
  • Possible duplicate of Build fails with "Command failed with a nonzero exit code" Commented Jan 15, 2019 at 0:11
  • 1
    None of the solution works for me and I wanted to why this is happening. Commented Jan 15, 2019 at 1:04
  • Please share a minimal Podfile that demonstrates the problem. Commented Jan 15, 2019 at 2:15
  • Make sure you're using the .xcworkspace file and not the .xcproject file. Commented Jan 15, 2019 at 7:11

2 Answers 2

-5

Open Keychain Access > Right click on Login > Lock >

Open Keychain Access > Right click on Login > Unlock

Clear Derived Data

Clear Bean folder

than restart Computer

Open project and run again

By the way i am From Surat,Gujarat,India >>> hahaha

Sign up to request clarification or add additional context in comments.

Comments

-6

Ty to clean your project, steps:

hold SHIFT + Command + K

Then try to build your project again.

I'm assuming that after you install the pods, you had closed the project and opened the white workspace, if not you should do this first.

3 Comments

This was the first thing I did but it did nothing. It says build succeed and when I run the project I get the same problem of returns a nonzero exit code.
This answer is on every question relating to this error and has dozens of people saying it does not work, not sure why it keeps getting posted
If anybody cares I solved this by manually pointing pods to specific swift version. For one of the pods, I needed to point to swift 4.0 namely 'TKImageShowing' library. Every other pods were satisfied with 4.2 as their swift version. This took me many permutation and nothing is properly documented on Xcode. That is why this confuse arose in first place.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.