hilen / TSWeChat

A WeChat alternative. Written in Swift 5.
MIT License
3.77k stars 790 forks source link

error: unknown argument: '-suppress-warnings' #23

Closed quhongjun closed 6 years ago

quhongjun commented 7 years ago

您好!我是新手,编译时发现两个错误,都是一样的错误,发生在编译BSGridCollectionViewLayout 和Alamofire的时候。请问博主知道是什么原因吗?谢谢!

:0: error: unknown argument: '-suppress-warnings' Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc failed with exit code 1
hilen commented 7 years ago

你的 CocoaPods 版本号? 使用的是哪个 pod 源?

quhongjun commented 7 years ago

你好!我的pod版本是1.2.0.

pod源是这样: ququs-Mac:~ hqu$ pod repo master

hilen commented 7 years ago

22 https://rubygems.org/ 的源在国内速度不行。你可以使用通过 gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/ 来使用 https://gems.ruby-china.org/ 的源

quhongjun commented 7 years ago

谢谢博主回复!我是在国外,pod下载没有问题。我手动运行swiftc带上 -suppress-warnings 参数,它提示同样的错误。所以应该是xcode不支持 "-suppress-warnings" 这个选项。这就很奇怪了。不知道各位是否遇到过类似的问题?小弟是刚刚接触xcode开发,对此一窍不通。我用的xcode版本是7.0。swiftc版本是2.0. 用vmware虚拟机运行OS X 10.10。

hilen commented 7 years ago

哦,Xcode 7 应该是不行的,这个工程需要 Xcode 8 以上。另外 -suppress-warnings 这个选项我没有什么经验。你可以更新到 Xcode 8 试试。

quhongjun commented 7 years ago

好的,非常感谢博主!!