I want to disable all of the warnings (marked with yellow color) in the 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?
            Asked
            
        
        
            Active
            
        
            Viewed 1,993 times
        
    3
            
            
         
    
    
        Evgeny Karkan
        
- 8,782
- 2
- 32
- 38
- 
                    1I don't have an answer to your question, but I'm curious. Why would you do that? – Quentin Hayot Oct 01 '15 at 09:50
- 
                    see this link may be helps you http://stackoverflow.com/questions/31540446/how-to-silence-a-warning-in-swift-2-0 – Anbu.Karthik Oct 01 '15 at 09:52
- 
                    3@QuentinHayot I have 3-rd party lib in my project. After migration to Swift 2 - I have tons of warnings generated by it. I don't want to fix them, hope it's more clearer now ) – Evgeny Karkan Oct 01 '15 at 09:57
- 
                    Yeah, makes sense. Thanks. – Quentin Hayot Oct 01 '15 at 09:58
- 
                    Have a look at this post: http://stackoverflow.com/questions/6921884/in-xcode-how-to-suppress-all-warnings-in-specific-source-files – Karthik Dec 16 '15 at 01:13
- 
                    @Karthik, thanks, but it only works for ObjC projects. – Evgeny Karkan Dec 16 '15 at 23:14
- 
                    There is no way to achieve that in Swift. Your question is a duplicate of http://stackoverflow.com/questions/31540446/how-to-silence-a-warning-in-swift-2-0. – Robert Gummesson Apr 21 '16 at 13:35
1 Answers
-1
            
            
         
    
    
        PowHu
        
- 2,159
- 16
- 17
- 
                    1I want to disable warnings for concrete BlahBlahBlah.swift file, not in all project. – Evgeny Karkan Oct 01 '15 at 09:54
- 
                    
