Swift file - how to disable all warnings?

2020-07-21 06:57发布

问题:

I want to disable all of the warnings (marked with yellow color) in Swift file.
I've tried to add -w flag to Build Phases, but it doesn't work.
In Objective-C it works, but how to do that in Swift?

回答1:

Target > Building Settings > Search "Warning" > Change Yes to No > Done