Xcode11 beat编译swift代码报错问题
<unknown>:0: error: unknown argument: '-w'<unknown>:0: error: unknown argument: '-Xanalyzer'<unknown>:0: error: unknown argument: '-analyzer-disable-all-checks'Command CompileSwiftSources failed with a nonzero exit code
这个问题是cocoapods导致的, 详情见此连接inhibit_all_warnings! breaks with Swift files in Xcode11 beta 4
stack ovewflow对此问题的讨论
解决方案1
打开Podfile文件, 注释掉inhibit_all_warnings!
, 然后执行pod update, 就可以编译成功
解决方案2
inhibit_all_warnings! breaks with Swift files in Xcode11 beta 4
升级cocoapods到1.7.5, cocoapods1.7.5已经修复了这个bug.
解决方案3
升级Xcode 11到更高的beta版, 最新的GM版也修复了这个问题
SnapKit的issue