Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Xcode Configuration Files

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.

Xcode Configuration Files

What Xcode configuration (.xcconfig) files are, and why they might be useful to you.

Presented at the HelsinkiOS/CocoaHeads meetup on January 22, 2013.

Avatar for Ali Rantakari

Ali Rantakari

January 22, 2013
Tweet

More Decks by Ali Rantakari

Other Decks in Programming

Transcript

  1. Comments // I am disabling -Wunused-variable because goddamnit, I might

    // need those variables later! Who knows, right! // WARNING_CFLAGS = -Wall -Wno-unused-variable
  2. DRY to the max LIBFOO_ROOT = $(SRCROOT)/MyApp/libfoo HEADER_SEARCH_PATHS = "$(LIBFOO_ROOT)/include"

    LIBRARY_SEARCH_PATHS = "$(LIBFOO_ROOT)/lib" (Yes, you can do this with the GUI as well, but this is nicer, no?)
  3. Inheritance WARNING_CFLAGS = -Wall Common.xcconfig #include "Common.xcconfig" WARNING_CFLAGS = $(inherited)

    -Wno-unused-variables Other.xcconfig (!!) does not do what you may think it does
  4. If you must composite values… MY_COMMON_WARNING_CFLAGS = -Wall Common.xcconfig #include

    "Common.xcconfig" WARNING_CFLAGS = $(MY_COMMON_WARNING_CFLAGS) -Wno-unused-variables Other.xcconfig Set final composite value in “leaf” config file Use custom keys for intermediate values