My project built fine before updating Xcode.
Now however, I can no longer build the project. When using Swift 5, building the project just never finishes. It stops on "Building 70 of 100 tasks" and just never finishes. Those numbers aren't always the same, either, but it never finishes building.
If I try to use Xcode to convert my project from Swift 4.2 to Swift 5, it similarly never finishes converting.
If I try changing the toolchain to use the Swift 4.2.1 release toolchain, the code compiles successfully but I get this crash immediately at runtime:
dyld: Symbol not found: _$SBOWV
Referenced from: /Users/compc/Library/Developer/Xcode/DerivedData/Swift_Coder-hczsehpbafcwkfgwyameucznmhsp/Build/Products/Debug/Swift Coder.app/Contents/MacOS/../Frameworks/SavannaKit.framework/Versions/A/SavannaKit
Expected in: /usr/lib/swift/libswiftCore.dylib
in /Users/compc/Library/Developer/Xcode/DerivedData/Swift_Coder-hczsehpbafcwkfgwyameucznmhsp/Build/Products/Debug/Swift Coder.app/Contents/MacOS/../Frameworks/SavannaKit.framework/Versions/A/SavannaKit
I've tried cleaning the project and deleting derived data but neither seems to work.
The project continues to build and run perfectly fine if I use Xcode 10.1.
I had problems with some of my code involving extending the ClosedRange type to Encodable and Decodable in a custom way. In Swift 5, ClosedRange already conforms to Encodable and Decodable when its Bound is Encodable and Decodable, but the compiler wasn't giving me an error about the redundant conformance, instead just hanging on compilation.
After I modified my code to use the new Swift 5 protocol conformance, it compiled fine. It took a long time to narrow down the problem to this, however. It seems to me to be a bug in the Swift Compiler because the compiler hangs in a Playground or from the command line as well, even on a different Mac.
Do your project contains any third libraries? If so, try to figure out which one is outdated. Try to build project without this libraries, i'm perfectly sure some of them are just outdated. You may also want to set up swift language version to old one. Select the target, goto Build Settings > Swift Language Version
Please delete Derived Data,
You can go to File > Workspace Settings if you are in a workspace environment or File > Project Settings for a regular project environment. Then click over the little grey arrow under Derived data section and select your project folder to delete it.
if you have Pods Than deintegrate and reinstalling all pod files again.
Hope this works for you!