Class: Pod::Target::BuildSettings
- Inherits:
-
Object
- Object
- Pod::Target::BuildSettings
- Defined in:
- lib/cocoapods-jxedt/binary/targets/pod_target.rb
Overview
Defined Under Namespace
Classes: AggregateTargetSettings, PodTargetSettings
Instance Method Summary collapse
-
#missing_framework_header_search_path(pt) ⇒ Object
missing framework header search paths.
-
#replace_xcconfig_configuration_paths(paths) ⇒ Object
replace different configuration xcconfig.
Instance Method Details
#missing_framework_header_search_path(pt) ⇒ Object
missing framework header search paths
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/cocoapods-jxedt/binary/targets/pod_target.rb', line 56 def missing_framework_header_search_path(pt) return [] unless pt.frame_header_search_paths_enable? paths = [] pt.file_accessors.each do |file_accessor| # xcframeworks greater_than_or_equal_to_1_10_0 = Gem::Version.new(Pod::VERSION) >= Gem::Version.new('1.10.0') greater_than_or_equal_to_1_11_0 = Gem::Version.new(Pod::VERSION) >= Gem::Version.new('1.11.0') file_accessor.vendored_xcframeworks.map { |path| if greater_than_or_equal_to_1_11_0 Xcode::XCFramework.new(file_accessor.spec.name, path) else Xcode::XCFramework.new(path) end }.each { |xcfwk| xcfwk.slices.each { |slice| fwk_name = slice.path.basename if greater_than_or_equal_to_1_11_0 paths.push "${PODS_XCFRAMEWORKS_BUILD_DIR}/#{xcfwk.target_name}/#{fwk_name}/Headers" elsif greater_than_or_equal_to_1_10_0 paths.push "${PODS_XCFRAMEWORKS_BUILD_DIR}/#{fwk_name.to_s.gsub(/\.framework$/, '')}/#{fwk_name}/Headers" else paths.push "${PODS_CONFIGURATION_BUILD_DIR}/#{fwk_name}/Headers" end } } # Cocoapods 1.9.x bugs if Gem::Version.new(Pod::VERSION) < Gem::Version.new('1.10.0') file_accessor.vendored_xcframeworks.each { |path| Dir.glob("#{path.to_s}/**/*.framework").each do |fwk_path| header_path = Pathname.new("#{fwk_path}/Headers") next unless header_path.exist? paths.push "${PODS_ROOT}/#{header_path.relative_path_from(pt.sandbox.root)}" end } end # frameworks (file_accessor.vendored_frameworks - file_accessor.vendored_xcframeworks).each { |framework| header_path = Pathname.new("#{framework}/Headers") next unless header_path.exist? paths.push "${PODS_ROOT}/#{header_path.relative_path_from(pt.sandbox.root)}" } end replace_xcconfig_configuration_paths(paths) paths.uniq end |
#replace_xcconfig_configuration_paths(paths) ⇒ Object
replace different configuration xcconfig
105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/cocoapods-jxedt/binary/targets/pod_target.rb', line 105 def replace_xcconfig_configuration_paths(paths) xcconfig_configuration_alias = Jxedt.config.xcconfig_configuration_alias support_configurations = Jxedt.config.support_configurations match_configuration = support_configurations.join('|') paths.map! { |path| if path =~ /#{xcconfig_configuration_alias}-(#{match_configuration})/ configuration = @configuration.to_s.downcase matchs = support_configurations.select {|name| name.downcase == configuration } path.gsub!(/#{xcconfig_configuration_alias}-(#{match_configuration})/, "#{xcconfig_configuration_alias}-#{matchs.first}") if matchs.count == 1 end path } paths end |