Skip to content

Loading…

Create xcconfig files which can be aggregated into other xcconfig files. #80

Closed
alloy opened this Issue · 6 comments

2 participants

@alloy
CocoaPods member

When a user defines multiple targets, it could be that they will end up using two distinct target libs in one project target. This means that the user will have to be able to combine two xcconfig files to one.

It might be a good idea to generate two files per target. One which defines the actual values, but with namespaced keys and the actual xcconfig file which just imports the other one and assigns the values to the actual keys. This will allow the user to create aggregate configs from multiple target configs easily.

Target 1

Pods-definitions.xcconfig:

USER_HEADER_SEARCH_PATHS-Pods = "Pods/AFNetworking"

Pods-test.xcconfig:

#include "Pods-definitions.xcconfig"
USER_HEADER_SEARCH_PATHS = USER_HEADER_SEARCH_PATHS-Pods

Target 2

Pods-test-definitions.xcconfig:

USER_HEADER_SEARCH_PATHS-Pods-test = "Pods/Kiwi"

Pods-test.xcconfig:

#include "Pods-test-definitions.xcconfig"
USER_HEADER_SEARCH_PATHS = USER_HEADER_SEARCH_PATHS-Pods-test

Custom aggregate target

Say the user now wants to use both the Pods libs in one target, then they can easily combine the configs like so:

CustomAggregate.xcconfig:

#include "Pods-definitions.xcconfig"
#include "Pods-test-definitions.xcconfig"
USER_HEADER_SEARCH_PATHS = $(USER_HEADER_SEARCH_PATHS-Pods) $(USER_HEADER_SEARCH_PATHS-Pods-test)
@alloy
CocoaPods member

See #79

@fabiopelosin
CocoaPods member

Closing this as apparently fixed in #79.

@alloy
CocoaPods member

No #79 is about multiple projects in one workspace, this is about creating re-usable xcconfig files.

@alloy alloy reopened this
@fabiopelosin
CocoaPods member

ops, sorry.

@fabiopelosin fabiopelosin was assigned
@alloy
CocoaPods member

Somewhat related: #911.

@fabiopelosin
CocoaPods member

Moving to #833

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.