Edit Xcode xcconfig file and Cocoapods

onmyway133 picture onmyway133 · Jun 16, 2014 · Viewed 11.4k times · Source

I want to edit the xcconfig file, but unfortunately Xcode only allows 1 xcconfig file per configuration, and that is Pods.xcconfig because I'm using Cocoapods

So how can I edit the xcconfig without hurting Cocoapods

I can think of several ways

  1. Make Xcode use multiple xcconfig files
  2. Use my own xcconfig file that includes Pods.xcconfig file

So how to deal with this ?

Answer

Raphael picture Raphael · Feb 23, 2018

Nowadays (XCode 9.x, CocoaPods 1.4.0) you just add

#include "Pods/Target Support Files/Pods-MyApp/Pods-Pods-MyApp.debug.xcconfig"

to your custom xcconfig. pod install will complain but automatically do the right thing (nothing); it'll even tell us to do exactly the above.


It's not necessary anymore to prevent integration (which would leave us without a workspace, too). FWIW, option --no-integrate no longer exists; if we wanted it, we'd add :integrate_targets => false as option to install! in the Podfile.