xcconfig
iphone: get User Defined variable in Target’s setting by code?
As the Info.plist file is preprocessed too, you can use this approach: Define a User defined setting in your build settings, for Example CLASS_NAME. And a key to your Info.plist-file. Name the key CLASS_NAME and set the value to ${CLASS_NAME}. You can then access this setting by: NSString* className = [[[NSBundle mainBundle] infoDictionary] valueForKey:@”CLASS_NAME”];
Is there a way export xcode build settings to .xcconfig file?
This SO answer helped me. Show the package contents of your project file (MyProject.xcodeproj) by two-finger clicking (right-clicking) on it in finder, then open the ‘project.pbxproj’ file in a text editor. Look for the section XCConfigurationList. It starts with /* Begin XCConfigurationList section */. You will find all your targets and their respective builConfigurations. Now … Read more
How to append values in xcconfig variables?
For reasons stated in other answers to this question, you can’t inherit values easily. I recommend defining your settings in cascade. Let’s assume APP is your project prefix and make this simple defining only a few CFLAGS: platform.xcconfig: APP_PLATFORM_CFLAGS = -DMAS=1 project.xcconfig: #include “platform.xcconfig” APP_PROJECT_CFLAGS = -DBETA=1 target-one.xcconfig: #include “project.xcconfig” APP_TARGET_CFLAGS = -DSUPER_COOL=1 #include “merge.xcconfig” … Read more
Incorrect path for Pods.debug.xcconfig in Xcode?
I had the same problem in Xcode 6.1.1. I did the following to solve it: Set the configuration file setting* “None” for the Pods related target. Close the .xcworkspace. run pod install again now open and build your .xcworkspace *The configuration file setting is found by selecting the project (not the target) and then the … Read more
How can I use .xcconfig files in Xcode 4?
Pick File | New, choose Other and “Configuration Settings File”, this gets you a new .xcconfig file. Then click on the project on the upper left in the file browser (the same place where you get to build settings), click on the project again in the second-to-left panel, and click on the Info tab at … Read more
How do I configure full URLs in xcconfig files
Here’s a simple workaround: WEBSITE_URL = https:/$()/www.example.com