Method: Pod::Podfile::TargetDefinition#parse_configuration_whitelist

Defined in:
lib/cocoapods-core/podfile/target_definition.rb

#parse_configuration_whitelist(name, requirements) ⇒ void (private)

This method returns an undefined value.

Removes :configurations or :configuration from the requirements list, and adds the pod's name into the internal hash for which pods should be linked in which configuration only.

Parameters:

  • name (String)

    The name of the pod

  • requirements (Array)

    If :configurations is the only key in the hash, the hash should be destroyed because it confuses Gem::Dependency.



1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
# File 'lib/cocoapods-core/podfile/target_definition.rb', line 1129

def parse_configuration_whitelist(name, requirements)
  options = requirements.last
  return requirements unless options.is_a?(Hash)

  configurations = options.delete(:configurations)
  configurations ||= options.delete(:configuration)
  Array(configurations).each do |configuration|
    whitelist_pod_for_configuration(name, configuration)
  end
  requirements.pop if options.empty?
end