Class: Pod::PodTarget
- Inherits:
-
Target
show all
- Defined in:
- lib/cocoapods-jxedt/binary/targets/pod_target.rb
Instance Attribute Summary
Attributes inherited from Target
#use_binary
Instance Method Summary
collapse
Methods inherited from Target
#explicit_header_search_pod_names, #frame_header_search_paths_enable?, #reject_header_search_pod_names
Instance Method Details
#old_resource_paths ⇒ Object
3
|
# File 'lib/cocoapods-jxedt/binary/targets/pod_target.rb', line 3
alias_method :old_resource_paths, :resource_paths
|
#resource_paths ⇒ Object
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# File 'lib/cocoapods-jxedt/binary/targets/pod_target.rb', line 4
def resource_paths
resource_paths = old_resource_paths
return resource_paths unless self.use_binary
resource_paths.each do |name, resources|
resources.map! {|resource_file|
resource_extname = Pathname.new(resource_file).basename.extname
next resource_file unless self.class.resource_extension_compilable?(resource_extname)
output_extname = self.class.output_extension_for_resource(resource_extname)
output_file_name = "#{Pathname.new(resource_file).basename.sub_ext('')}#{output_extname}"
file_accessors.each do |file_accessor|
file_accessor.vendored_frameworks.each do |framework_file|
framework_name = Pathname.new(framework_file).basename.sub_ext('').to_s
next if self.product_module_name != framework_name
if '.xcframework' == Pathname.new(framework_file).basename.extname
files = Dir.glob("#{framework_file}/**/#{framework_name}.framework/#{output_file_name}")
next if files.size == 0
if Gem::Version.new(Pod::VERSION) >= Gem::Version.new('1.10.0')
resource_file = "${PODS_XCFRAMEWORKS_BUILD_DIR}/#{self.name}/#{framework_name}.framework/#{output_file_name}"
else
resource_file = "${PODS_CONFIGURATION_BUILD_DIR}/#{framework_name}.framework/#{output_file_name}"
end
else
files = Dir.glob("#{framework_file}/#{output_file_name}")
next if files.size == 0
resource_path = Pathname.new("#{framework_file}/#{output_file_name}") resource_file = "${PODS_ROOT}/#{resource_path.relative_path_from(self.sandbox.root)}"
end
end
end
resource_file
}.reject!(&:nil?)
end
resource_paths
end
|