Class: Pod::Generator::XCConfig::PublicPodXCConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods/generator/xcconfig/public_pod_xcconfig.rb

Overview

Generates the public xcconfigs for the pod targets.

The public xcconfig file for a Pod is completely namespaced to prevent configuration value collision with the build settings of other Pods. This xcconfig includes the standard podspec defined values including libraries, frameworks, weak frameworks and xcconfig overrides.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target) ⇒ PublicPodXCConfig

Initialize a new instance

Parameters:

  • target (Target)

    @see target



20
21
22
# File 'lib/cocoapods/generator/xcconfig/public_pod_xcconfig.rb', line 20

def initialize(target)
  @target = target
end

Instance Attribute Details

#targetTarget (readonly)

Returns the target represented by this xcconfig.

Returns:

  • (Target)

    the target represented by this xcconfig.



14
15
16
# File 'lib/cocoapods/generator/xcconfig/public_pod_xcconfig.rb', line 14

def target
  @target
end

#xcconfigXcodeproj::Config (readonly)

Returns The generated xcconfig.

Returns:

  • (Xcodeproj::Config)

    The generated xcconfig.



26
27
28
# File 'lib/cocoapods/generator/xcconfig/public_pod_xcconfig.rb', line 26

def xcconfig
  @xcconfig
end

Instance Method Details

#generateXcodeproj::Config

Generates the xcconfig for the target.

Returns:

  • (Xcodeproj::Config)


43
44
45
46
47
# File 'lib/cocoapods/generator/xcconfig/public_pod_xcconfig.rb', line 43

def generate
  @xcconfig = Xcodeproj::Config.new
  XCConfigHelper.add_settings_for_file_accessors_of_target(target, @xcconfig)
  @xcconfig
end

#save_as(path) ⇒ void

This method returns an undefined value.

Generates and saves the xcconfig to the given path.

Parameters:

  • path (Pathname)

    the path where the prefix header should be stored.



35
36
37
# File 'lib/cocoapods/generator/xcconfig/public_pod_xcconfig.rb', line 35

def save_as(path)
  generate.save_as(path, target.xcconfig_prefix)
end