I have the same issue like https://stackoverflow.com/questions/69413667/xcode-13-compiling-old-swiftui-with-error-of-command-compileswiftsources-failed. I can run, build, and archive with all previous version of Xcode without any problem. However, Apple does not allow to upload ipa not-built with SDK15, therefore, I have to use Xcode 13 to build my app. Does anyone know how to fix this issue? My project does not use Pods at all.
SWiftUI built with Xcode 13 stuck, force stop and showing Command CompileSwiftSources failed with a nonzero exit code
this issue was solved. I kept the compiler running till the end, and showed error as " The compiler is unable to type-check this expression in reasonable time。". Well, I googled the error and found there're too many "if" operators, and causing too complicated for SWIFT to handle. So, changing most of "if" in a function like this https://www.hackingwithswift.com/forums/swiftui/the-compiler-is-unable-to-type-check-this-expression-in-reasonable-time/12595