Although this other answer will remove warnings during the build phase, it doesn't appear to completely fix the Analyze
phase (which caused our CI build to still have issues).
What worked for me (in addition to the accepted answer) was:
Click on the Pods
project from the Project Navigator
Choose the actual Pod-
Target and click on Build Settings
Filter with the phrase compiler flags
Add a new Other C Flags
with the value -w -Xanalyzer -analyzer-disable-checker -Xanalyzer core
(or whichever analyzers you need disabled) - this answer provides the full list of flags to try -- please upvote it!
The version of clang
in Xcode 6.3.1, though, doesn't seem to include insecureAPI
so you can remove it from that list. The "current" full list is -w -Xanalyzer -analyzer-disable-checker -Xanalyzer alpha -Xanalyzer -analyzer-disable-checker -Xanalyzer core -Xanalyzer -analyzer-disable-checker -Xanalyzer cplusplus -Xanalyzer -analyzer-disable-checker -Xanalyzer deadcode -Xanalyzer -analyzer-disable-checker -Xanalyzer debug -Xanalyzer -analyzer-disable-checker -Xanalyzer llvm -Xanalyzer -analyzer-disable-checker -Xanalyzer osx -Xanalyzer -analyzer-disable-checker -Xanalyzer security -Xanalyzer -analyzer-disable-checker -Xanalyzer unix
Note that setting this on the Pods
Project or Pods
Target will not work. I'm not sure why, but you have to set it for each actual Pod-
target.
You can also set the compiler flags (-w -Xanalyzer -analyzer-disable-checker -Xanalyzer core
etc.) on a per-file basis.
I also tried a couple other methods (which may or may not be required in addition to the above). They were performed on the Pods
Project itself.
[1]
- Filter with the phrase
analyzer
- Make sure
Analyze During 'Build'
is set to NO
.
- Change all the settings to
NO
(including Improper Memory Management
)
[2]
- Filter with the phrase
warnings
- Change
inhibit all warnings
to YES
For some reason, even disabling the Analyze
step in the scheme doesn't seem to work.
Go to the Product > Scheme > Manage Schemes
window, click on each Pod-*
from the list and click the Edit
button. Click Build
on the left-hand list, and then uncheck Analyze
on the right-hand side for the Pod
target.
I am still confused as to why I can't completely disable the Pods from being analyzed, although I expect it might have to do with the "Find implicit dependencies" checked in the scheme's build settings. If that was unchecked, though, it looks like something else would need to happen for the app to link to the pods.