class Pod::Target::BuildSettings::PodTargetSettings
A subclass that generates build settings for a {PodTarget}
Attributes
@return [Boolean]
whether settings are being generated for an application bundle
@return [Boolean]
whether settings are being generated for an application bundle
@return [Boolean]
whether settings are being generated for an library bundle
@return [Boolean]
whether settings are being generated for an library bundle
@return [Specification]
The non-library specification these build settings are for or `nil`.
@return [Boolean]
whether settings are being generated for a test bundle
@return [Boolean]
whether settings are being generated for a test bundle
Public Class Methods
@see BuildSettings.build_settings_names
# File lib/cocoapods/target/build_settings.rb, line 528 def self.build_settings_names @build_settings_names | BuildSettings.build_settings_names end
Initializes a new instance
@param [PodTarget] target
see {#target}
@param [Specification] non_library_spec
see {#non_library_spec}
@param [Symbol] configuration
see {#configuration}
Pod::Target::BuildSettings::new
# File lib/cocoapods/target/build_settings.rb, line 570 def initialize(target, non_library_spec = nil, configuration: nil) super(target) if @non_library_spec = non_library_spec @test_xcconfig = non_library_spec.test_specification? @app_xcconfig = non_library_spec.app_specification? @xcconfig_spec_type = non_library_spec.spec_type @library_xcconfig = false else @test_xcconfig = @app_xcconfig = false @xcconfig_spec_type = :library @library_xcconfig = true end (@configuration = configuration) || raise("No configuration for #{self}.") end
Public Instance Methods
Converts array of library path references to just the names to use link each library, e.g. from ‘/path/to/libSomething.a’ to ‘Something’
@param [Array<String>] libraries
@return [Array<String>]
# File lib/cocoapods/target/build_settings.rb, line 767 def linker_names_from_libraries(libraries) libraries.map { |l| File.basename(l, File.extname(l)).sub(/\Alib/, '') } end
# File lib/cocoapods/target/build_settings.rb, line 550 def non_library_xcconfig? !library_xcconfig? end
@see BuildSettings#other_swift_flags_without_swift?
# File lib/cocoapods/target/build_settings.rb, line 924 def other_swift_flags_without_swift? return false if library_xcconfig? target.uses_swift_for_spec?(non_library_spec) end
Returns the pod_target_xcconfig
for the pod target and its spec consumers grouped by keys
@return [Hash{String,Hash{Target,String}]
# File lib/cocoapods/target/build_settings.rb, line 1048 def pod_target_xcconfig_values_by_consumer_by_key spec_consumers.each_with_object({}) do |spec_consumer, hash| spec_consumer.pod_target_xcconfig.each do |k, v| (hash[k] ||= {})[spec_consumer] = v end end end
@return [Boolean] whether the ‘-ObjC` linker flag is required.
@note this is only true when generating build settings for a test bundle
# File lib/cocoapods/target/build_settings.rb, line 967 def requires_objc_linker_flag? test_xcconfig? || app_xcconfig? end