cocoapods-xcconfig-hooks
A CocoaPods plugin to hook xcconfig of CocoaPods targets.
Installation
$ gem install cocoapods-xcconfig-hooks
Usage
Load the plugin
Load this plugin by adding the following line at the beginning of Podfile (example: here).
plugin "cocoapods-xcconfig-hooks"Configure the plugin (optional)
In Podfile, call the config_xcconfig_hooks method to provide customization for your setup (example: here).
config_xcconfig_hooks(
hook_dir: "path/to/xcconfig/dir",
aggregate_targets_only: true
)The following table explains the parameters of the config_xcconfig_hooks method.
| Parameter | Type | Default | Description |
|---|---|---|---|
hook_dir |
string | .xcconfigs |
Path to the directory containing xcconfig files (relative to the project directory) |
aggregate_targets_only |
boolean | false |
Whether to hook aggregate targets only (ex. Pods-App, Pods-AppUITests...) |
After pod installation, the settings defined in those xcconfig files should be hooked to the project.
Order of xcconfig hooks
xcconfig files (if present in the hook_dir) are included in the following order.
__base__.xcconfig-
<configuration_name>.xcconfig(ex.debug.xcconfig) -
<TargetName>.__base__.xcconfig(ex:Pods-Example.__base__.xcconfig) -
<TargetName>.<configuration_name>.xcconfig(ex:Pods-Example.debug.xcconfig)
