Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The build configuration for a pod is not applied to its resource targets #3463

Closed
Inferis opened this issue Apr 27, 2015 · 1 comment
Closed

Comments

@Inferis
Copy link
Contributor

Inferis commented Apr 27, 2015

We got bitten by this today with a development pod, but I think it applies to all pods.

The problem is that the resource targets are using the Xcode defaults which is fine in itself, unless you want non default resource processing. The most straightforward option is to use configuration to specify the correct processing. With the current version of CocoaPods, this is not possible.

In our case: we have several XIBs in our development pod. Those XIBs are specified as resources in the development pod's podspec. When integrated into the target project, only the iPhone versions of those XIBs are built into NIBs, and not the iPad version. This is because TARGETS_DEVICE_FAMILY setting defaults to 1 (iPhone), and so the XIB compiler only makes an iPhone NIB. You can override this by changing the setting to 1,2 (iPhone, iPad).

Now there was no way to override the setting for the resource target. Adding:

spec.xcconfig = { 'TARGETS_DEVICE_FAMILY' => '1,2' } 

to the Podspec only applied the configuration setting to the configuration of the pod but not to its resource targets.

I think it's safe enough to also apply the pod configuration to the resource target. Another option would be to specify seperate config for the resource target, but this opens a can of worms I feel: would you have one configuration per resource target or the same for all of them? ¯_(ツ)_/¯ Using the pod's configuration seems like the sane path to take.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants