You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 to1
(iPhone), and so the XIB compiler only makes an iPhone NIB. You can override this by changing the setting to1,2
(iPhone, iPad).Now there was no way to override the setting for the resource target. Adding:
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.
The text was updated successfully, but these errors were encountered: