Command compileswift failed with a nonzero exit code xcode 12

Command CompileSwift failed with a nonzero exit code in Xcode 10

Questions : Command CompileSwift failed with a nonzero exit code in Xcode 10

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00

783

After updating to the latest version of anycodings_xcode10 Xcode at the moment (version 10.0) the anycodings_xcode10 project is unable to build because it found anycodings_xcode10 some errors regarding some "Command anycodings_xcode10 CompileSwift failed with a nonzero exit anycodings_xcode10 code" error.

How do I solve this errors? They appear in anycodings_xcode10 most of the Pods (I use CocoaPods) I use anycodings_xcode10 inside my project.

I have tried updating the pod version and anycodings_xcode10 the pods to the latest version available, anycodings_xcode10 but the problem is still there.

I have searched a lot through the web and anycodings_xcode10 there is very little information regarding anycodings_xcode10 this issue.

Total Answers 23

31

Answers 1 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

For me, just cleaning project works anycodings_xcode10 using ShiftCommandK & anycodings_xcode10 OptionShiftCommandK.

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

mRahman

2

Answers 2 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

You're most likely not reading the anycodings_xcode10 entire error message. If you look above anycodings_xcode10 the "Command CompileSwift failed with a anycodings_xcode10 nonzero exit code" message you should anycodings_xcode10 find some specification like this:

In this example I had two files with the anycodings_xcode10 same name. Once I fixed it everything anycodings_xcode10 worked as it should.

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

jidam

1

Answers 3 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

Currently my build is working. Here you anycodings_xcode10 are the steps I tried until it finally anycodings_xcode10 worked:

  1. Search in the whole project the word CommonCrypto.
  2. If you have a Pod containing that header import, remove this Pod from the Podfile and perform a pod install.
  3. Clean and build the project.
  4. Add again the Pod to the Podfile and perform a pod install.
  5. Clean and build the project again using a real device if possible.

And If you don't have that Pod, maybe anycodings_xcode10 you can try by making the same steps anycodings_xcode10 with some old Pod that you may encounter anycodings_xcode10 in your project.

Added information: also If you have some anycodings_xcode10 code error inside a Pod, first you need anycodings_xcode10 to solve that code problem and then try anycodings_xcode10 to compile again the project.

I'm going to copy the changes made in my anycodings_xcode10 project.pbxproj. I know it's not very anycodings_xcode10 helpful but it's the only thing that anycodings_xcode10 have changed in the git difference anycodings_xcode10 commit:

Removed: BDC9821B1E9BD1B600ADE0EF /* (null) in Sources */ = {isa = PBXBuildFile; }; Added: BDC9821B1E9BD1B600ADE0EF /* BuildFile in Sources */ = {isa = PBXBuildFile; };

I hope this can help,

Regards.

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

jidam

6

Answers 4 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

I attempted

  • Closing & Reopening Xcode
  • Cleaning Build Folder
  • Running pod install --repo-update

and all of these still did not fix the anycodings_xcode10 problem.

Restarting the Mac did the trick!

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

jidam

1

Answers 5 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

I had this issue and changing the anycodings_xcode10 Compilation Mode setting for the project anycodings_xcode10 from Incremental to Whole Module fixed anycodings_xcode10 it for me.

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

miraj

6

Answers 6 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

This is a known issue with Swift 4.2 and anycodings_xcode10 Xcode 10. I found an article here that anycodings_xcode10 fixed it for me: anycodings_xcode10 //github.com/Yummypets/YPImagePicker/issues/236

In short, go to your projects build anycodings_xcode10 settings, and add a user defined setting anycodings_xcode10 named SWIFT_ENABLE_BATCH_MODE and set anycodings_xcode10 its value to NO.

Previously, I tried each of the anycodings_xcode10 following methods suggested elsewhere anycodings_xcode10 (rebuild, exit Xcode, clean and rebuild, anycodings_xcode10 purge Derived Data files). None of them anycodings_xcode10 worked.

Once I added the user define build anycodings_xcode10 setting per the article, Swift then told anycodings_xcode10 me the true error. In my case, it was a anycodings_xcode10 missing }, but it could be any number of anycodings_xcode10 problems.

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

miraj

4

Answers 7 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

My problem was I had due to the anycodings_xcode10 non-existence of a native Swift anycodings_xcode10 CommonCrypto, used a bridging header and anycodings_xcode10 a target that with some magic included anycodings_xcode10 it in the build. Since CommonCrypto is anycodings_xcode10 now native, I solved the problem by anycodings_xcode10 removing the target and the #import and anycodings_xcode10 instead added an import CommonCrypto anycodings_xcode10 where I used it.

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

jidam

3

Answers 8 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

Here is the solution: - Go to build anycodings_xcode10 settings - Search anycodings_xcode10 SWIFT_COMPILATION_MODE - If this is anycodings_xcode10 "Whole Module" for Release configuration anycodings_xcode10 then change it to "Incremental". - anycodings_xcode10 Archive now.

When you change the setting to anycodings_xcode10 "Incremental" the process succeeds.

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

miraj

6

Answers 9 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

I did the following and it works like anycodings_xcode10 charm:

  • Open Xcode Preferences (Command,)
  • Go to the Locations tab
  • Click on the small gray arrow which shows URL path for Derived Data
  • The finder window will open up and show anycodings_xcode10 the following folders:

    • DerivedData
    • Archives
    • iOS DeviceSupport
    • UserData
    • DocumentationCache
    • iOS Device Logs
  • Quit Xcode

  • Delete the DerivedData folder (it just contains a cache from previous builds)
  • Restart Xcode

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

miraj

3

Answers 10 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

Running pod install --repo-update and anycodings_xcode10 closing and reopening x-code fixed this anycodings_xcode10 issue on all of my pods that had this anycodings_xcode10 error.

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

miraj

1

Answers 11 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

Mine was a name spacing issue. I had two anycodings_xcode10 files with the same name. Just renamed anycodings_xcode10 them and it resolved.

Always gotta check the 'stupid me' box anycodings_xcode10 first before looking elsewhere. : )

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

raja

1

Answers 12 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

Let me share my experience for this anycodings_xcode10 issue fix.

Open target -> Build phases -> anycodings_xcode10 Copy Bundle Resources and remove anycodings_xcode10 info.plist.

Note: If you're using any extensions, anycodings_xcode10 remove the info.plist of that extension anycodings_xcode10 from the Targets.

Hope it helps.

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

joy

3

Answers 13 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

in my case the problem was due to anycodings_xcode10 watchkit extension being set to swift 3 anycodings_xcode10 while the main project's target was set anycodings_xcode10 to swift 4.2

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

joy

4

Answers 14 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

Class re-declaration will be the anycodings_xcode10 problem. check duplicate class and anycodings_xcode10 build.

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

joy

5

Answers 15 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

It seems like this is a pretty vague anycodings_xcode10 error, so I will share what I did to fix anycodings_xcode10 it when I ran into this:

Using Xcode 10.1 and Swift 4.2 I tried anycodings_xcode10 pretty much all the suggestions here but anycodings_xcode10 none of them worked for me, then I anycodings_xcode10 realized a dependency I was using was anycodings_xcode10 not compatible with Swift 4.2 and that anycodings_xcode10 was causing me to get this error on anycodings_xcode10 other pods. So to fix it I just had to anycodings_xcode10 force that pod to use Swift 4.0 by anycodings_xcode10 putting this at the end of my Podfile:

post_install do |installer| installer.pods_project.targets.each do |target| if ['TKRadarChart'].include? target.name target.build_configurations.each do |config| config.build_settings['SWIFT_VERSION'] = '4.0' end end end end

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

joy

4

Answers 16 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

I searched the whole web but I couldn't anycodings_xcode10 find any solution for this problem. I anycodings_xcode10 managed to REMOVE the "Common Crypto" anycodings_xcode10 path in the section: IMPORT Paths in anycodings_xcode10 Build settings. The problem seems to be anycodings_xcode10 that "common crypto" now exists in the anycodings_xcode10 foundation in the ios 12 sdk.

So":

Simply remove the path for file "common anycodings_xcode10 crypto" in the build settings and the anycodings_xcode10 project will build like a charm! :)

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

jidam

4

Answers 17 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

Just adding to this question. My issue anycodings_xcode10 didn't have anything to do with anycodings_xcode10 CommonCrypto. It created a new Single anycodings_xcode10 App application and tested to run. anycodings_xcode10 Compiler was complaining about using anycodings_xcode10 Swift 4.2

Changing the Swift language to version anycodings_xcode10 4.0 in Build settings fixed the issue. anycodings_xcode10 Not sure if this is a bug.

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

joy

3

Answers 18 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

I got this randomly since Xcode 10. I anycodings_xcode10 think it occurs when I change something anycodings_xcode10 in the code while building starts. The anycodings_xcode10 next build works every time.

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

raja

2

Answers 19 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

I also encountered the same issue and I anycodings_xcode10 did what @cdeerinck suggested and got to anycodings_xcode10 the following link which suggested anycodings_xcode10 adding a user-defined variable to the anycodings_xcode10 Build Settings to disable batch mode anycodings_xcode10 i.e. add a new user defined variable anycodings_xcode10 named SWIFT_ENABLE_BATCH_MODE and set it anycodings_xcode10 to NO, I was able to get more insights anycodings_xcode10 into the issue and I got to know that anycodings_xcode10 the error was in a framework using anycodings_xcode10 CommonCrypto which was added to it(by anycodings_xcode10 me) but since Xcode 10 it is exposed anycodings_xcode10 natively as part of Swift (for Apple anycodings_xcode10 platforms only), and adding it (or its anycodings_xcode10 existence from the previous version) was anycodings_xcode10 causing a name collision and hence it anycodings_xcode10 was throwing the error. To know more anycodings_xcode10 refer to the this link which explains anycodings_xcode10 the issue in more detail.

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

raja

1

Answers 20 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

I have the same issue and my solution is anycodings_xcode10 change a little thing in Build Settings

SWIFT_COMPILATION_MODE = singlefile; SWIFT_OPTIMIZATION_LEVEL = "-O";

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

raja

5

Answers 21 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

In my case, there was a duplicate entry anycodings_xcode10 for a framework in the Input Files of anycodings_xcode10 Carthage framework section in Build anycodings_xcode10 Phases

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

jidam

1

Answers 22 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

ERROR = Command CompileSwiftSources anycodings_xcode10 failed with a nonzero exit code

In my case When I found this error, I anycodings_xcode10 got cramped with compilation. But when I anycodings_xcode10 see some related problem answers. I anycodings_xcode10 found a duplication file on my project. anycodings_xcode10 Where the same viewController was there anycodings_xcode10 as a class file. So yeah when I realized anycodings_xcode10 it I changed it name to new one. And anycodings_xcode10 yeah things changed!!!

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

raja

3

Answers 23 : of Command CompileSwift failed with a nonzero exit code in Xcode 10

For me, the error message said I had too anycodings_xcode10 many simulator files open to build anycodings_xcode10 Swift. When I quit the simulator and anycodings_xcode10 built again, everything worked.

0

2022-09-16T08:06:57+00:00 2022-09-16T08:06:57+00:00Answer Link

jidam

Toplist

Latest post

TAGs