I'm trying to build a good architecture for my iOS app and I'm encountering problems with my xcconfig configuration. I have a couple of CocoaPods and it is only natural that they contain warnings. I've been silencing those with inhibit_all_warnings!
directive on top of CocoaPods integration. So my Podfile looks something like this:
platform :ios, '7.0'
inhibit_all_warnings!
source 'https://github.com/CocoaPods/Specs.git'
pod 'AFNetworking', '~> 2.x'
...
This actually works, no warnings are displayed when building the project with this configuration.
But I am trying to force a very strict environment when building the app, so I've created a couple of .xcconfig files that force errors on warnings and enable almost every warning possible. This is the part of the xcconfig file that actually does this:
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
WARNING_CFLAGS = -Weverything -Wno-objc-missing-property-synthesis -Wno-unused-macros;
Both lines are working correctly, but the problem appears that CocoaPod library's warnings are also treated as errors. Disabling GCC_TREAT_WARNINGS_AS_ERRORS
will make project compile again, but warnings are back from CocoaPods.
So my question is:
How would I set my .xcconfig files correctly, that WARNING_CFLAGS would be used only on project files, not library files?
Or how to make inhibit_all_warnings! pod directive work when WARNING_CFLAGS configuration variable is set, as it seems to ignore it in this case?
Thanks for all help!