MP

Helpful per-file Compiler Flags for Xcode

If you’ve ever included third party classes in your Xcode project then you know just how distracting it can be to get warnings for code that you trust or that you aren’t allowed to modify.

To help save your sanity—and bring focus to warnings for code you can change—here’s a helpful listing of per-file compiler flags.

  • Disable the static analyzer: -Xanalyzer -analyzer-disable-checker
  • Disable Auto Retain Counting (ARC): -fno-objc-arc
  • Disable all warnings: -w