Swift migration failed Segmentation fault: 11

XCode V 12.2/12.5

Swift 5

All iPhone and iPad apps submitted to the App Store must be built with XCode 12 and the iOS 14 SDK or later.

My project working into XCode 11.2 but when i moved it on XCode 12.2 i getting below error

Segmentation fault: 11 Command compile swift failed with a nonzero exit code

From past days I am stuck on above error. I tried out many solutions after googling on apple developer forum and stack overflow but unfortunately error still exist.

tried below link similar like-

Swift migration failed Segmentation fault: 11

Xcode 12 - Segmentation Fault 11 - SegFault

xcode 12 compile issue

Command CompileSwift failed with a nonzero exit code

I also had the same problem,

-when I cleaned the derived data

-Remove all removed derived data from Trash as well.

-Stop Xcode, restart it and clean build

Into Build Setting I have changes some properties like

SWIFT_COMPILATION_MODE - changed to whole module

Please help me i stuck from last week .

Unfortunately, there's no quick fix for Segmentation fault: 11. In some limited cases, Clean Build Folder or removing derived data might work, but not for all cases.

The first thing you should do is finding out which Swift file is (or which Swift files are) causing the issue. How many Swift files do you have in your project?

Did you get messages in Issue Navigator to migrate to Swift5 or similar message ?

Swift migration failed Segmentation fault: 11
 
 
Q