Class: Pod::Target::BuildSettings::PodTargetSettings

Inherits:
Pod::Target::BuildSettings show all
Defined in:
lib/cocoapods/target/build_settings.rb

Overview

A subclass that generates build settings for a PodTarget

Since:

  • 1.5.0

Constant Summary

Constants inherited from Pod::Target::BuildSettings

CONFIGURATION_BUILD_DIR_VARIABLE, PLURAL_SETTINGS

Public API collapse

Attributes inherited from Pod::Target::BuildSettings

#target

Public API collapse

Paths collapse

Frameworks collapse

Libraries collapse

Clang collapse

Swift collapse

Linking collapse

Packaging collapse

Target Properties collapse

Methods inherited from Pod::Target::BuildSettings

#code_sign_identity, #framework_search_paths_to_import_developer_frameworks, #gcc_preprocessor_definitions, #initialize_copy, #other_cflags, #other_ldflags, #pods_build_dir, #pods_configuration_build_dir, #save_as, #use_recursive_script_inputs_in_script_phases

Constructor Details

#initialize(target, non_library_spec = nil) ⇒ PodTargetSettings

Initializes a new instance

Parameters:

Since:

  • 1.5.0


518
519
520
521
522
523
524
525
526
527
528
529
530
# File 'lib/cocoapods/target/build_settings.rb', line 518

def initialize(target, non_library_spec = 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
end

Instance Attribute Details

#app_xcconfigObject (readonly) Also known as: app_xcconfig?

Since:

  • 1.5.0


495
496
497
# File 'lib/cocoapods/target/build_settings.rb', line 495

def app_xcconfig
  @app_xcconfig
end

#library_xcconfigObject (readonly) Also known as: library_xcconfig?

Since:

  • 1.5.0


498
499
500
# File 'lib/cocoapods/target/build_settings.rb', line 498

def library_xcconfig
  @library_xcconfig
end

#non_library_specSpecification (readonly)

Returns The non-library specification these build settings are for or `nil`.

Returns:

  • (Specification)

    The non-library specification these build settings are for or `nil`.

Since:

  • 1.5.0


508
509
510
# File 'lib/cocoapods/target/build_settings.rb', line 508

def non_library_spec
  @non_library_spec
end

#test_xcconfigBoolean (readonly) Also known as: test_xcconfig?

Returns whether settings are being generated for a test bundle

Returns:

  • (Boolean)

    whether settings are being generated for a test bundle

Since:

  • 1.5.0


492
493
494
# File 'lib/cocoapods/target/build_settings.rb', line 492

def test_xcconfig
  @test_xcconfig
end

Class Method Details

.build_settings_namesObject


485
486
487
# File 'lib/cocoapods/target/build_settings.rb', line 485

def self.build_settings_names
  @build_settings_names | BuildSettings.build_settings_names
end

Instance Method Details

#application_extension_api_onlyString

The `application_extension_api_only` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `application_extension_api_only, build_setting, memoized`.

Returns:

  • (String)

864
865
866
# File 'lib/cocoapods/target/build_settings.rb', line 864

define_build_settings_method :application_extension_api_only, :build_setting => true, :memoized => true do
  target.application_extension_api_only ? 'YES' : nil
end

#configuration_build_dirString

The `configuration_build_dir` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `configuration_build_dir, build_setting, memoized`.

Returns:

  • (String)

858
859
860
861
# File 'lib/cocoapods/target/build_settings.rb', line 858

define_build_settings_method :configuration_build_dir, :build_setting => true, :memoized => true do
  return if non_library_xcconfig?
  target.configuration_build_dir(CONFIGURATION_BUILD_DIR_VARIABLE)
end

#consumer_frameworksArray<String>

The `consumer_frameworks` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `consumer_frameworks, memoized`.

Returns:

  • (Array<String>)

557
558
559
# File 'lib/cocoapods/target/build_settings.rb', line 557

define_build_settings_method :consumer_frameworks, :memoized => true do
  spec_consumers.flat_map(&:frameworks)
end

#dependent_targetsArray<PodTarget>

The `dependent_targets` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `dependent_targets, memoized`.

Returns:


873
874
875
876
877
878
879
880
881
882
883
# File 'lib/cocoapods/target/build_settings.rb', line 873

define_build_settings_method :dependent_targets, :memoized => true do
  select_maximal_pod_targets(
    if test_xcconfig?
      target.dependent_targets_for_test_spec(non_library_spec)
    elsif app_xcconfig?
      target.dependent_targets_for_app_spec(non_library_spec)
    else
      target.recursive_dependent_targets
    end,
  )
end

The `dependent_targets_to_link` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `dependent_targets_to_link, memoized`.

Returns:


886
887
888
889
890
891
892
893
894
# File 'lib/cocoapods/target/build_settings.rb', line 886

define_build_settings_method :dependent_targets_to_link, :memoized => true do
  if test_xcconfig?
    # we're embedding into an app defined by an app spec
    host_targets = target.app_host_dependent_targets_for_spec(non_library_spec)
    dependent_targets - host_targets
  else
    dependent_targets
  end
end

#dynamic_frameworks_to_importArray<String>

The `dynamic_frameworks_to_import` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `dynamic_frameworks_to_import, memoized`.

Returns:

  • (Array<String>)

589
590
591
592
593
594
# File 'lib/cocoapods/target/build_settings.rb', line 589

define_build_settings_method :dynamic_frameworks_to_import, :memoized => true do
  dynamic_frameworks_to_import = vendored_dynamic_frameworks.map { |f| File.basename(f, '.framework') }
  dynamic_frameworks_to_import << target.product_basename if target.should_build? && target.build_as_dynamic_framework?
  dynamic_frameworks_to_import.concat consumer_frameworks
  dynamic_frameworks_to_import
end

#dynamic_libraries_to_importArray<String>

The `dynamic_libraries_to_import` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `dynamic_libraries_to_import, memoized`.

Returns:

  • (Array<String>)

694
695
696
697
698
699
# File 'lib/cocoapods/target/build_settings.rb', line 694

define_build_settings_method :dynamic_libraries_to_import, :memoized => true do
  dynamic_libraries_to_import = linker_names_from_libraries(vendored_dynamic_libraries)
  dynamic_libraries_to_import.concat spec_consumers.flat_map(&:libraries)
  dynamic_libraries_to_import << target.product_basename if target.should_build? && target.build_as_dynamic_library?
  dynamic_libraries_to_import
end

#file_accessorsArray<Sandbox::FileAccessor>

The `file_accessors` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `file_accessors, memoized`.

Returns:


920
921
922
923
924
925
926
# File 'lib/cocoapods/target/build_settings.rb', line 920

define_build_settings_method :file_accessors, :memoized => true do
  if non_library_xcconfig?
    target.file_accessors.select { |fa| non_library_spec == fa.spec }
  else
    target.file_accessors.select { |fa| fa.spec.spec_type == @xcconfig_spec_type }
  end
end

#framework_header_search_pathString

The `framework_header_search_path` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `framework_header_search_path, memoized`.

Returns:

  • (String)

625
626
627
628
# File 'lib/cocoapods/target/build_settings.rb', line 625

define_build_settings_method :framework_header_search_path, :memoized => true do
  return unless target.build_as_framework?
  "#{target.build_product_path}/Headers"
end

#framework_search_pathsArray<String>

The `framework_search_paths` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `framework_search_paths, build_setting, memoized, sorted, uniqued`.

Returns:

  • (Array<String>)

616
617
618
619
620
621
622
# File 'lib/cocoapods/target/build_settings.rb', line 616

define_build_settings_method :framework_search_paths, :build_setting => true, :memoized => true, :sorted => true, :uniqued => true do
  paths = super().dup
  paths.concat dependent_targets.flat_map { |t| t.build_settings.framework_search_paths_to_import }
  paths.concat framework_search_paths_to_import
  paths.delete(target.configuration_build_dir(CONFIGURATION_BUILD_DIR_VARIABLE)) if library_xcconfig?
  paths
end

#framework_search_paths_to_importArray<String>

The `framework_search_paths_to_import` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `framework_search_paths_to_import, memoized`.

Returns:

  • (Array<String>)

636
637
638
639
640
641
642
# File 'lib/cocoapods/target/build_settings.rb', line 636

define_build_settings_method :framework_search_paths_to_import, :memoized => true do
  paths = framework_search_paths_to_import_developer_frameworks(consumer_frameworks)
  paths.concat vendored_framework_search_paths
  return paths unless target.build_as_framework? && target.should_build?

  paths + [target.configuration_build_dir(CONFIGURATION_BUILD_DIR_VARIABLE)]
end

#frameworksArray<String>

The `frameworks` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `frameworks, memoized, sorted, uniqued`.

Returns:

  • (Array<String>)

562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
# File 'lib/cocoapods/target/build_settings.rb', line 562

define_build_settings_method :frameworks, :memoized => true, :sorted => true, :uniqued => true do
  return [] if target.build_as_static? && library_xcconfig?

  frameworks = []
  frameworks.concat consumer_frameworks
  if library_xcconfig?
    # We know that this library target is being built dynamically based
    # on the guard above, so include any vendored static frameworks.
    frameworks.concat vendored_static_frameworks.map { |l| File.basename(l, '.framework') } if target.should_build?
    # Also include any vendored dynamic frameworks of dependencies.
    frameworks.concat dependent_targets.reject(&:should_build?).flat_map { |pt| pt.build_settings.dynamic_frameworks_to_import }
  else
    frameworks.concat dependent_targets_to_link.flat_map { |pt| pt.build_settings.frameworks_to_import }
  end

  frameworks
end

#frameworks_to_importArray<String>

The `frameworks_to_import` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `frameworks_to_import, memoized, sorted, uniqued`.

Returns:

  • (Array<String>)

606
607
608
# File 'lib/cocoapods/target/build_settings.rb', line 606

define_build_settings_method :frameworks_to_import, :memoized => true, :sorted => true, :uniqued => true do
  static_frameworks_to_import + dynamic_frameworks_to_import
end

#header_search_pathsArray<String>

The `header_search_paths` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `header_search_paths, build_setting, memoized, sorted`.

Returns:

  • (Array<String>)

772
773
774
# File 'lib/cocoapods/target/build_settings.rb', line 772

define_build_settings_method :header_search_paths, :build_setting => true, :memoized => true, :sorted => true do
  target.header_search_paths(:include_dependent_targets_for_test_spec => test_xcconfig? && non_library_spec, :include_dependent_targets_for_app_spec => app_xcconfig? && non_library_spec)
end

#ld_runpath_search_pathsArray<String>

The `ld_runpath_search_paths` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `ld_runpath_search_paths, build_setting, memoized`.

Returns:

  • (Array<String>)

838
839
840
841
# File 'lib/cocoapods/target/build_settings.rb', line 838

define_build_settings_method :ld_runpath_search_paths, :build_setting => true, :memoized => true do
  return if library_xcconfig?
  _ld_runpath_search_paths(:test_bundle => test_xcconfig?)
end

#librariesArray<String>

The `libraries` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `libraries, memoized, sorted, uniqued`.

Returns:

  • (Array<String>)

670
671
672
673
674
675
676
677
678
679
680
681
682
683
# File 'lib/cocoapods/target/build_settings.rb', line 670

define_build_settings_method :libraries, :memoized => true, :sorted => true, :uniqued => true do
  return [] if library_xcconfig? && target.build_as_static?

  libraries = []
  if non_library_xcconfig? || target.build_as_dynamic?
    libraries.concat linker_names_from_libraries(vendored_static_libraries)
    libraries.concat libraries_to_import
  end
  if non_library_xcconfig?
    libraries.concat dependent_targets.flat_map { |pt| pt.build_settings.dynamic_libraries_to_import }
    libraries.concat dependent_targets_to_link.flat_map { |pt| pt.build_settings.static_libraries_to_import }
  end
  libraries
end

#libraries_to_importArray<String>

The `libraries_to_import` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `libraries_to_import, memoized, sorted, uniqued`.

Returns:

  • (Array<String>)

702
703
704
# File 'lib/cocoapods/target/build_settings.rb', line 702

define_build_settings_method :libraries_to_import, :memoized => true, :sorted => true, :uniqued => true do
  static_libraries_to_import + dynamic_libraries_to_import
end

#library_search_pathsArray<String>

The `library_search_paths` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `library_search_paths, build_setting, memoized, sorted, uniqued`.

Returns:

  • (Array<String>)

707
708
709
710
711
712
713
714
715
716
717
718
# File 'lib/cocoapods/target/build_settings.rb', line 707

define_build_settings_method :library_search_paths, :build_setting => true, :memoized => true, :sorted => true, :uniqued => true do
  return [] if library_xcconfig? && target.build_as_static?

  vendored = library_search_paths_to_import.dup
  vendored.concat dependent_targets.flat_map { |t| t.build_settings.vendored_dynamic_library_search_paths }
  if library_xcconfig?
    vendored.delete(target.configuration_build_dir(CONFIGURATION_BUILD_DIR_VARIABLE))
  else
    vendored.concat(dependent_targets.flat_map { |t| t.build_settings.library_search_paths_to_import })
  end
  vendored
end

#library_search_paths_to_importArray<String>

The `library_search_paths_to_import` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `library_search_paths_to_import, memoized`.

Returns:

  • (Array<String>)

741
742
743
744
745
746
# File 'lib/cocoapods/target/build_settings.rb', line 741

define_build_settings_method :library_search_paths_to_import, :memoized => true do
  vendored_library_search_paths = vendored_static_library_search_paths + vendored_dynamic_library_search_paths
  return vendored_library_search_paths if target.build_as_framework? || !target.should_build?

  vendored_library_search_paths << target.configuration_build_dir(CONFIGURATION_BUILD_DIR_VARIABLE)
end

#linker_names_from_libraries(libraries) ⇒ Array<String>

Converts array of library path references to just the names to use link each library, e.g. from '/path/to/libSomething.a' to 'Something'

Parameters:

  • libraries (Array<String>)

Returns:

  • (Array<String>)

Since:

  • 1.5.0


665
666
667
# File 'lib/cocoapods/target/build_settings.rb', line 665

def linker_names_from_libraries(libraries)
  libraries.map { |l| File.basename(l, l.extname).sub(/\Alib/, '') }
end

#merged_pod_target_xcconfigsHash{String, String}

Merges the pod_target_xcconfig for all pod targets into a single hash and warns on conflicting definitions.

The `merged_pod_target_xcconfigs` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `merged_pod_target_xcconfigs, memoized`.

Returns:

  • (Hash{String, String})

914
915
916
917
# File 'lib/cocoapods/target/build_settings.rb', line 914

define_build_settings_method :merged_pod_target_xcconfigs, :memoized => true do
  merged_xcconfigs(pod_target_xcconfig_values_by_consumer_by_key, :pod_target_xcconfig,
                   :overriding => non_library_xcconfig? ? target.build_settings.merged_pod_target_xcconfigs : {})
end

#module_map_file_to_importArray<String>

The `module_map_file_to_import` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `module_map_file_to_import, memoized`.

Returns:

  • (Array<String>)

758
759
760
761
762
763
764
765
766
767
768
769
# File 'lib/cocoapods/target/build_settings.rb', line 758

define_build_settings_method :module_map_file_to_import, :memoized => true do
  return unless target.should_build?
  return if target.build_as_framework? # framework module maps are automatically discovered
  return unless target.defines_module?

  if target.uses_swift?
    # for swift, we have a custom build phase that copies in the module map, appending the .Swift module
    "${PODS_CONFIGURATION_BUILD_DIR}/#{target.label}/#{target.product_module_name}.modulemap"
  else
    "${PODS_ROOT}/#{target.module_map_path.relative_path_from(target.sandbox.root)}"
  end
end

#module_map_filesArray<String>

The `module_map_files` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `module_map_files, memoized`.

Returns:

  • (Array<String>)

753
754
755
# File 'lib/cocoapods/target/build_settings.rb', line 753

define_build_settings_method :module_map_files, :memoized => true do
  dependent_targets.map { |t| t.build_settings.module_map_file_to_import }.compact.sort
end

#non_library_xcconfig?Boolean

Returns:

  • (Boolean)

Since:

  • 1.5.0


501
502
503
# File 'lib/cocoapods/target/build_settings.rb', line 501

def non_library_xcconfig?
  !library_xcconfig?
end

#other_swift_flagsArray<String>

The `other_swift_flags` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `other_swift_flags, build_setting, memoized`.

Returns:

  • (Array<String>)

793
794
795
796
797
798
799
800
801
802
# File 'lib/cocoapods/target/build_settings.rb', line 793

define_build_settings_method :other_swift_flags, :build_setting => true, :memoized => true do
  return unless target.uses_swift? || other_swift_flags_without_swift?

  flags = super()
  flags << '-suppress-warnings' if target.inhibit_warnings? && library_xcconfig?
  if !target.build_as_framework? && target.defines_module? && library_xcconfig?
    flags.concat %w( -import-underlying-module -Xcc -fmodule-map-file=${SRCROOT}/${MODULEMAP_FILE} )
  end
  flags
end

#other_swift_flags_without_swift?Boolean

Returns:

  • (Boolean)

See Also:

Since:

  • 1.5.0


786
787
788
789
790
# File 'lib/cocoapods/target/build_settings.rb', line 786

def other_swift_flags_without_swift?
  return false if library_xcconfig?

  target.uses_swift_for_spec?(non_library_spec)
end

#pod_target_xcconfig_values_by_consumer_by_keyHash{String,Hash{Target,String}]

Returns the pod_target_xcconfig for the pod target and its spec consumers grouped by keys

Returns:

  • (Hash{String,Hash{Target,String}])

    HashString,Hash{Target,String]

Since:

  • 1.5.0


901
902
903
904
905
906
907
# File 'lib/cocoapods/target/build_settings.rb', line 901

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

#pods_rootString

The `pods_root` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `pods_root, build_setting`.

Returns:

  • (String)

543
544
545
# File 'lib/cocoapods/target/build_settings.rb', line 543

define_build_settings_method :pods_root, :build_setting => true do
  '${SRCROOT}'
end

#pods_target_srcrootString

The `pods_target_srcroot` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `pods_target_srcroot, build_setting`.

Returns:

  • (String)

548
549
550
# File 'lib/cocoapods/target/build_settings.rb', line 548

define_build_settings_method :pods_target_srcroot, :build_setting => true do
  target.pod_target_srcroot
end

#product_bundle_identifierString

The `product_bundle_identifier` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `product_bundle_identifier, build_setting`.

Returns:

  • (String)

853
854
855
# File 'lib/cocoapods/target/build_settings.rb', line 853

define_build_settings_method :product_bundle_identifier, :build_setting => true do
  'org.cocoapods.${PRODUCT_NAME:rfc1034identifier}'
end

#public_header_search_pathsArray<String>

The `public_header_search_paths` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `public_header_search_paths, memoized, sorted`.

Returns:

  • (Array<String>)

777
778
779
# File 'lib/cocoapods/target/build_settings.rb', line 777

define_build_settings_method :public_header_search_paths, :memoized => true, :sorted => true do
  target.header_search_paths(:include_dependent_targets_for_test_spec => test_xcconfig? && non_library_spec, :include_dependent_targets_for_app_spec => app_xcconfig? && non_library_spec, :include_private_headers => false)
end

#requires_fobjc_arc?Boolean

The `requires_fobjc_arc?` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `requires_fobjc_arc?, memoized`.

Returns:

  • (Boolean)

    whether the `-fobjc-arc` linker flag is required.


832
833
834
835
# File 'lib/cocoapods/target/build_settings.rb', line 832

define_build_settings_method :requires_fobjc_arc?, :memoized => true do
  target.podfile.set_arc_compatibility_flag? &&
    file_accessors.any? { |fa| fa.spec_consumer.requires_arc? }
end

#requires_objc_linker_flag?Boolean

Note:

this is only true when generating build settings for a test bundle

Returns whether the `-ObjC` linker flag is required.

Returns:

  • (Boolean)

    whether the `-ObjC` linker flag is required.

Since:

  • 1.5.0


826
827
828
# File 'lib/cocoapods/target/build_settings.rb', line 826

def requires_objc_linker_flag?
  test_xcconfig? || app_xcconfig?
end

#skip_installString

The `skip_install` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `skip_install, build_setting`.

Returns:

  • (String)

848
849
850
# File 'lib/cocoapods/target/build_settings.rb', line 848

define_build_settings_method :skip_install, :build_setting => true do
  'YES'
end

#spec_consumersArray<Specification::Consumer>

The `spec_consumers` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `spec_consumers, memoized`.

Returns:

  • (Array<Specification::Consumer>)

929
930
931
932
933
934
935
# File 'lib/cocoapods/target/build_settings.rb', line 929

define_build_settings_method :spec_consumers, :memoized => true do
  if non_library_xcconfig?
    target.spec_consumers.select { |sc| non_library_spec == sc.spec }
  else
    target.spec_consumers.select { |sc| sc.spec.spec_type == @xcconfig_spec_type }
  end
end

#static_frameworks_to_importArray<String>

The `static_frameworks_to_import` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `static_frameworks_to_import, memoized`.

Returns:

  • (Array<String>)

581
582
583
584
585
586
# File 'lib/cocoapods/target/build_settings.rb', line 581

define_build_settings_method :static_frameworks_to_import, :memoized => true do
  static_frameworks_to_import = []
  static_frameworks_to_import.concat vendored_static_frameworks.map { |f| File.basename(f, '.framework') } unless target.should_build? && target.build_as_dynamic?
  static_frameworks_to_import << target.product_basename if target.should_build? && target.build_as_static_framework?
  static_frameworks_to_import
end

#static_libraries_to_importArray<String>

The `static_libraries_to_import` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `static_libraries_to_import, memoized`.

Returns:

  • (Array<String>)

686
687
688
689
690
691
# File 'lib/cocoapods/target/build_settings.rb', line 686

define_build_settings_method :static_libraries_to_import, :memoized => true do
  static_libraries_to_import = []
  static_libraries_to_import.concat linker_names_from_libraries(vendored_static_libraries) unless target.should_build? && target.build_as_dynamic?
  static_libraries_to_import << target.product_basename if target.should_build? && target.build_as_static_library?
  static_libraries_to_import
end

#swift_include_pathsArray<String>

The `swift_include_paths` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `swift_include_paths, build_setting, memoized, sorted, uniqued`.

Returns:

  • (Array<String>)

805
806
807
808
809
# File 'lib/cocoapods/target/build_settings.rb', line 805

define_build_settings_method :swift_include_paths, :build_setting => true, :memoized => true, :sorted => true, :uniqued => true do
  paths = dependent_targets.flat_map { |t| t.build_settings.swift_include_paths_to_import }
  paths.concat swift_include_paths_to_import if non_library_xcconfig?
  paths
end

#swift_include_paths_to_importArray<String>

The `swift_include_paths_to_import` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `swift_include_paths_to_import, memoized`.

Returns:

  • (Array<String>)

812
813
814
815
816
# File 'lib/cocoapods/target/build_settings.rb', line 812

define_build_settings_method :swift_include_paths_to_import, :memoized => true do
  return [] unless target.uses_swift? && !target.build_as_framework?

  [target.configuration_build_dir(CONFIGURATION_BUILD_DIR_VARIABLE)]
end

#vendored_dynamic_frameworksArray<String>

The `vendored_dynamic_frameworks` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `vendored_dynamic_frameworks, memoized`.

Returns:

  • (Array<String>)

650
651
652
# File 'lib/cocoapods/target/build_settings.rb', line 650

define_build_settings_method :vendored_dynamic_frameworks, :memoized => true do
  file_accessors.flat_map(&:vendored_dynamic_frameworks)
end

#vendored_dynamic_librariesArray<String>

The `vendored_dynamic_libraries` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `vendored_dynamic_libraries, memoized`.

Returns:

  • (Array<String>)

726
727
728
# File 'lib/cocoapods/target/build_settings.rb', line 726

define_build_settings_method :vendored_dynamic_libraries, :memoized => true do
  file_accessors.flat_map(&:vendored_dynamic_libraries)
end

#vendored_dynamic_library_search_pathsArray<String>

The `vendored_dynamic_library_search_paths` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `vendored_dynamic_library_search_paths, memoized`.

Returns:

  • (Array<String>)

736
737
738
# File 'lib/cocoapods/target/build_settings.rb', line 736

define_build_settings_method :vendored_dynamic_library_search_paths, :memoized => true do
  vendored_dynamic_libraries.map { |f| File.join '${PODS_ROOT}', f.dirname.relative_path_from(target.sandbox.root) }
end

#vendored_framework_search_pathsArray<String>

The `vendored_framework_search_paths` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `vendored_framework_search_paths, memoized`.

Returns:

  • (Array<String>)

631
632
633
# File 'lib/cocoapods/target/build_settings.rb', line 631

define_build_settings_method :vendored_framework_search_paths, :memoized => true do
  file_accessors.flat_map(&:vendored_frameworks).map { |f| File.join '${PODS_ROOT}', f.dirname.relative_path_from(target.sandbox.root) }
end

#vendored_static_frameworksArray<String>

The `vendored_static_frameworks` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `vendored_static_frameworks, memoized`.

Returns:

  • (Array<String>)

645
646
647
# File 'lib/cocoapods/target/build_settings.rb', line 645

define_build_settings_method :vendored_static_frameworks, :memoized => true do
  file_accessors.flat_map(&:vendored_static_frameworks)
end

#vendored_static_librariesArray<String>

The `vendored_static_libraries` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `vendored_static_libraries, memoized`.

Returns:

  • (Array<String>)

721
722
723
# File 'lib/cocoapods/target/build_settings.rb', line 721

define_build_settings_method :vendored_static_libraries, :memoized => true do
  file_accessors.flat_map(&:vendored_static_libraries)
end

#vendored_static_library_search_pathsArray<String>

The `vendored_static_library_search_paths` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `vendored_static_library_search_paths, memoized`.

Returns:

  • (Array<String>)

731
732
733
# File 'lib/cocoapods/target/build_settings.rb', line 731

define_build_settings_method :vendored_static_library_search_paths, :memoized => true do
  vendored_static_libraries.map { |f| File.join '${PODS_ROOT}', f.dirname.relative_path_from(target.sandbox.root) }
end

#weak_frameworksArray<String>

The `weak_frameworks` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `weak_frameworks, memoized`.

Returns:

  • (Array<String>)

597
598
599
600
601
602
603
# File 'lib/cocoapods/target/build_settings.rb', line 597

define_build_settings_method :weak_frameworks, :memoized => true do
  return [] if target.build_as_static? && library_xcconfig?

  weak_frameworks = spec_consumers.flat_map(&:weak_frameworks)
  weak_frameworks.concat dependent_targets.flat_map { |pt| pt.build_settings.weak_frameworks_to_import }
  weak_frameworks
end

#weak_frameworks_to_importArray<String>

The `weak_frameworks_to_import` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `weak_frameworks_to_import, memoized, sorted, uniqued`.

Returns:

  • (Array<String>)

611
612
613
# File 'lib/cocoapods/target/build_settings.rb', line 611

define_build_settings_method :weak_frameworks_to_import, :memoized => true, :sorted => true, :uniqued => true do
  spec_consumers.flat_map(&:weak_frameworks)
end

#xcconfigXcodeproj::Xconfig

The `xcconfig` build setting for the Pod::Target::BuildSettings#target.

The return value from this method will be: `xcconfig, memoized`.

Returns:

  • (Xcodeproj::Xconfig)

533
534
535
536
# File 'lib/cocoapods/target/build_settings.rb', line 533

define_build_settings_method :xcconfig, :memoized => true do
  xcconfig = super()
  merge_spec_xcconfig_into_xcconfig(merged_pod_target_xcconfigs, xcconfig)
end