Class: Pod::Sandbox::FileAccessor

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-kz/native/file_accessor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#kz_pod_targetObject

Returns the value of attribute kz_pod_target.



7
8
9
# File 'lib/cocoapods-kz/native/file_accessor.rb', line 7

def kz_pod_target
  @kz_pod_target
end

Instance Method Details

#arc_source_filesObject



44
45
46
47
48
49
50
# File 'lib/cocoapods-kz/native/file_accessor.rb', line 44

def arc_source_files
  if !self.spec.test_specification && KZ::KZGlobalHelper.instance.pod_config_result_with_target(self.kz_pod_target)
    []
  else
    origin_arc_source_files
  end
end

#kz_headersObject



90
91
92
93
# File 'lib/cocoapods-kz/native/file_accessor.rb', line 90

def kz_headers
  extensions = HEADER_EXTENSIONS
  origin_source_files.select { |f| extensions.include?(f.extname) }
end

#kz_public_headersObject



95
96
97
98
99
100
101
102
103
104
105
# File 'lib/cocoapods-kz/native/file_accessor.rb', line 95

def kz_public_headers
  public_headers = public_header_files
  project_headers = project_header_files
  private_headers = private_header_files
  if public_headers.nil? || public_headers.empty?
    header_files = kz_headers
  else
    header_files = public_headers
  end
  header_files - project_headers - private_headers
end

#origin_arc_source_filesObject



43
# File 'lib/cocoapods-kz/native/file_accessor.rb', line 43

alias_method :origin_arc_source_files, :arc_source_files

#origin_public_headersObject



9
# File 'lib/cocoapods-kz/native/file_accessor.rb', line 9

alias_method :origin_public_headers, :public_headers

#origin_resource_bundlesObject



52
# File 'lib/cocoapods-kz/native/file_accessor.rb', line 52

alias_method :origin_resource_bundles, :resource_bundles

#origin_resourcesObject



61
# File 'lib/cocoapods-kz/native/file_accessor.rb', line 61

alias_method :origin_resources, :resources

#origin_source_filesObject



34
# File 'lib/cocoapods-kz/native/file_accessor.rb', line 34

alias_method :origin_source_files, :source_files

#origin_vendored_frameworksObject



73
# File 'lib/cocoapods-kz/native/file_accessor.rb', line 73

alias_method :origin_vendored_frameworks, :vendored_frameworks

#private_headersObject



26
27
28
29
30
31
32
# File 'lib/cocoapods-kz/native/file_accessor.rb', line 26

def private_headers
  if !self.spec.test_specification && KZ::KZGlobalHelper.instance.pod_config_result_with_target(self.kz_pod_target)
    []
  else
    private_header_files
  end
end

#project_headersObject



18
19
20
21
22
23
24
# File 'lib/cocoapods-kz/native/file_accessor.rb', line 18

def project_headers
  if !self.spec.test_specification && KZ::KZGlobalHelper.instance.pod_config_result_with_target(self.kz_pod_target)
    []
  else
    project_header_files
  end
end

#public_headers(include_frameworks = false) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/cocoapods-kz/native/file_accessor.rb', line 10

def public_headers(include_frameworks = false)
  if !self.spec.test_specification && KZ::KZGlobalHelper.instance.pod_config_result_with_target(self.kz_pod_target)
    []
  else
    origin_public_headers(include_frameworks)
  end
end

#resource_bundlesObject



53
54
55
56
57
58
59
# File 'lib/cocoapods-kz/native/file_accessor.rb', line 53

def resource_bundles
  if !self.spec.test_specification && KZ::KZGlobalHelper.instance.pod_config_result_with_target(self.kz_pod_target)
    {}
  else
    origin_resource_bundles
  end
end

#resourcesObject



62
63
64
65
66
67
68
69
70
71
# File 'lib/cocoapods-kz/native/file_accessor.rb', line 62

def resources
  result = KZ::KZGlobalHelper.instance.pod_config_result_with_target(self.kz_pod_target)
  if !self.spec.test_specification && result
    resources = origin_resources
    resources.concat(result.get_bundle_paths)
    resources
  else
    origin_resources
  end
end

#source_filesObject



35
36
37
38
39
40
41
# File 'lib/cocoapods-kz/native/file_accessor.rb', line 35

def source_files
  if !self.spec.test_specification && KZ::KZGlobalHelper.instance.pod_config_result_with_target(self.kz_pod_target)
    []
  else
    origin_source_files
  end
end

#vendored_frameworksObject



74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/cocoapods-kz/native/file_accessor.rb', line 74

def vendored_frameworks
  if self.kz_pod_target
    frameworks = origin_vendored_frameworks
    if KZ::KZGlobalHelper.instance.arm64_simulator && frameworks.count > 0
      frameworks = KZ::KZFrameworkManager.handle_origin_framework(frameworks, self.kz_pod_target)
    end
    result = KZ::KZGlobalHelper.instance.pod_config_result_with_target(self.kz_pod_target)
    if !self.spec.test_specification && result
      frameworks.concat(result.get_framework_paths)
    end
    frameworks
  else
    origin_vendored_frameworks
  end
end