cocoapods-tt 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/cocoapods-tt/command/native/install.rb +56 -0
- data/lib/cocoapods-tt/command/native/update.rb +157 -0
- data/lib/cocoapods-tt/command/tt/make.rb +92 -0
- data/lib/cocoapods-tt/command/tt.rb +115 -0
- data/lib/cocoapods-tt/command.rb +1 -0
- data/lib/cocoapods-tt/gem_version.rb +3 -0
- data/lib/cocoapods-tt/native/command.rb +185 -0
- data/lib/cocoapods-tt/native/config.rb +366 -0
- data/lib/cocoapods-tt/native/core_overrides.rb +1 -0
- data/lib/cocoapods-tt/native/downloader/cache.rb +322 -0
- data/lib/cocoapods-tt/native/downloader/request.rb +86 -0
- data/lib/cocoapods-tt/native/downloader/response.rb +16 -0
- data/lib/cocoapods-tt/native/downloader.rb +192 -0
- data/lib/cocoapods-tt/native/executable.rb +247 -0
- data/lib/cocoapods-tt/native/external_sources/abstract_external_source.rb +205 -0
- data/lib/cocoapods-tt/native/external_sources/downloader_source.rb +30 -0
- data/lib/cocoapods-tt/native/external_sources/path_source.rb +55 -0
- data/lib/cocoapods-tt/native/external_sources/podspec_source.rb +54 -0
- data/lib/cocoapods-tt/native/external_sources.rb +57 -0
- data/lib/cocoapods-tt/native/gem_version.rb +5 -0
- data/lib/cocoapods-tt/native/generator/acknowledgements/markdown.rb +44 -0
- data/lib/cocoapods-tt/native/generator/acknowledgements/plist.rb +94 -0
- data/lib/cocoapods-tt/native/generator/acknowledgements.rb +107 -0
- data/lib/cocoapods-tt/native/generator/app_target_helper.rb +363 -0
- data/lib/cocoapods-tt/native/generator/bridge_support.rb +22 -0
- data/lib/cocoapods-tt/native/generator/constant.rb +19 -0
- data/lib/cocoapods-tt/native/generator/copy_dsyms_script.rb +56 -0
- data/lib/cocoapods-tt/native/generator/copy_resources_script.rb +223 -0
- data/lib/cocoapods-tt/native/generator/copy_xcframework_script.rb +227 -0
- data/lib/cocoapods-tt/native/generator/dummy_source.rb +31 -0
- data/lib/cocoapods-tt/native/generator/embed_frameworks_script.rb +196 -0
- data/lib/cocoapods-tt/native/generator/file_list.rb +39 -0
- data/lib/cocoapods-tt/native/generator/header.rb +103 -0
- data/lib/cocoapods-tt/native/generator/info_plist_file.rb +128 -0
- data/lib/cocoapods-tt/native/generator/module_map.rb +99 -0
- data/lib/cocoapods-tt/native/generator/prefix_header.rb +60 -0
- data/lib/cocoapods-tt/native/generator/script_phase_constants.rb +100 -0
- data/lib/cocoapods-tt/native/generator/umbrella_header.rb +46 -0
- data/lib/cocoapods-tt/native/hooks_manager.rb +132 -0
- data/lib/cocoapods-tt/native/installer/analyzer/analysis_result.rb +87 -0
- data/lib/cocoapods-tt/native/installer/analyzer/locking_dependency_analyzer.rb +103 -0
- data/lib/cocoapods-tt/native/installer/analyzer/pod_variant.rb +87 -0
- data/lib/cocoapods-tt/native/installer/analyzer/pod_variant_set.rb +175 -0
- data/lib/cocoapods-tt/native/installer/analyzer/podfile_dependency_cache.rb +55 -0
- data/lib/cocoapods-tt/native/installer/analyzer/sandbox_analyzer.rb +268 -0
- data/lib/cocoapods-tt/native/installer/analyzer/specs_state.rb +108 -0
- data/lib/cocoapods-tt/native/installer/analyzer/target_inspection_result.rb +58 -0
- data/lib/cocoapods-tt/native/installer/analyzer/target_inspector.rb +258 -0
- data/lib/cocoapods-tt/native/installer/analyzer.rb +1204 -0
- data/lib/cocoapods-tt/native/installer/base_install_hooks_context.rb +135 -0
- data/lib/cocoapods-tt/native/installer/installation_options.rb +195 -0
- data/lib/cocoapods-tt/native/installer/pod_source_installer.rb +224 -0
- data/lib/cocoapods-tt/native/installer/pod_source_preparer.rb +77 -0
- data/lib/cocoapods-tt/native/installer/podfile_validator.rb +168 -0
- data/lib/cocoapods-tt/native/installer/post_install_hooks_context.rb +9 -0
- data/lib/cocoapods-tt/native/installer/post_integrate_hooks_context.rb +9 -0
- data/lib/cocoapods-tt/native/installer/pre_install_hooks_context.rb +51 -0
- data/lib/cocoapods-tt/native/installer/pre_integrate_hooks_context.rb +9 -0
- data/lib/cocoapods-tt/native/installer/project_cache/project_cache.rb +11 -0
- data/lib/cocoapods-tt/native/installer/project_cache/project_cache_analysis_result.rb +53 -0
- data/lib/cocoapods-tt/native/installer/project_cache/project_cache_analyzer.rb +200 -0
- data/lib/cocoapods-tt/native/installer/project_cache/project_cache_version.rb +43 -0
- data/lib/cocoapods-tt/native/installer/project_cache/project_installation_cache.rb +103 -0
- data/lib/cocoapods-tt/native/installer/project_cache/project_metadata_cache.rb +73 -0
- data/lib/cocoapods-tt/native/installer/project_cache/target_cache_key.rb +176 -0
- data/lib/cocoapods-tt/native/installer/project_cache/target_metadata.rb +74 -0
- data/lib/cocoapods-tt/native/installer/sandbox_dir_cleaner.rb +105 -0
- data/lib/cocoapods-tt/native/installer/sandbox_header_paths_installer.rb +45 -0
- data/lib/cocoapods-tt/native/installer/source_provider_hooks_context.rb +34 -0
- data/lib/cocoapods-tt/native/installer/target_uuid_generator.rb +34 -0
- data/lib/cocoapods-tt/native/installer/user_project_integrator/target_integrator/xcconfig_integrator.rb +179 -0
- data/lib/cocoapods-tt/native/installer/user_project_integrator/target_integrator.rb +815 -0
- data/lib/cocoapods-tt/native/installer/user_project_integrator.rb +280 -0
- data/lib/cocoapods-tt/native/installer/xcode/multi_pods_project_generator.rb +82 -0
- data/lib/cocoapods-tt/native/installer/xcode/pods_project_generator/aggregate_target_dependency_installer.rb +66 -0
- data/lib/cocoapods-tt/native/installer/xcode/pods_project_generator/aggregate_target_installer.rb +192 -0
- data/lib/cocoapods-tt/native/installer/xcode/pods_project_generator/app_host_installer.rb +154 -0
- data/lib/cocoapods-tt/native/installer/xcode/pods_project_generator/file_references_installer.rb +329 -0
- data/lib/cocoapods-tt/native/installer/xcode/pods_project_generator/pod_target_dependency_installer.rb +195 -0
- data/lib/cocoapods-tt/native/installer/xcode/pods_project_generator/pod_target_installer.rb +1239 -0
- data/lib/cocoapods-tt/native/installer/xcode/pods_project_generator/pod_target_integrator.rb +312 -0
- data/lib/cocoapods-tt/native/installer/xcode/pods_project_generator/pods_project_writer.rb +90 -0
- data/lib/cocoapods-tt/native/installer/xcode/pods_project_generator/project_generator.rb +120 -0
- data/lib/cocoapods-tt/native/installer/xcode/pods_project_generator/target_installation_result.rb +140 -0
- data/lib/cocoapods-tt/native/installer/xcode/pods_project_generator/target_installer.rb +257 -0
- data/lib/cocoapods-tt/native/installer/xcode/pods_project_generator/target_installer_helper.rb +110 -0
- data/lib/cocoapods-tt/native/installer/xcode/pods_project_generator.rb +291 -0
- data/lib/cocoapods-tt/native/installer/xcode/pods_project_generator_result.rb +54 -0
- data/lib/cocoapods-tt/native/installer/xcode/single_pods_project_generator.rb +38 -0
- data/lib/cocoapods-tt/native/installer/xcode/target_validator.rb +170 -0
- data/lib/cocoapods-tt/native/installer/xcode.rb +11 -0
- data/lib/cocoapods-tt/native/installer.rb +1044 -0
- data/lib/cocoapods-tt/native/native_target_extension.rb +60 -0
- data/lib/cocoapods-tt/native/open-uri.rb +33 -0
- data/lib/cocoapods-tt/native/podfile.rb +13 -0
- data/lib/cocoapods-tt/native/project.rb +544 -0
- data/lib/cocoapods-tt/native/resolver/lazy_specification.rb +88 -0
- data/lib/cocoapods-tt/native/resolver/resolver_specification.rb +41 -0
- data/lib/cocoapods-tt/native/resolver.rb +600 -0
- data/lib/cocoapods-tt/native/sandbox/file_accessor.rb +532 -0
- data/lib/cocoapods-tt/native/sandbox/headers_store.rb +163 -0
- data/lib/cocoapods-tt/native/sandbox/path_list.rb +242 -0
- data/lib/cocoapods-tt/native/sandbox/pod_dir_cleaner.rb +71 -0
- data/lib/cocoapods-tt/native/sandbox/podspec_finder.rb +23 -0
- data/lib/cocoapods-tt/native/sandbox.rb +470 -0
- data/lib/cocoapods-tt/native/sources_manager.rb +221 -0
- data/lib/cocoapods-tt/native/target/aggregate_target.rb +558 -0
- data/lib/cocoapods-tt/native/target/build_settings.rb +1385 -0
- data/lib/cocoapods-tt/native/target/pod_target.rb +1168 -0
- data/lib/cocoapods-tt/native/target.rb +378 -0
- data/lib/cocoapods-tt/native/user_interface/error_report.rb +204 -0
- data/lib/cocoapods-tt/native/user_interface/inspector_reporter.rb +102 -0
- data/lib/cocoapods-tt/native/user_interface.rb +463 -0
- data/lib/cocoapods-tt/native/validator.rb +1170 -0
- data/lib/cocoapods-tt/native/version_metadata.rb +26 -0
- data/lib/cocoapods-tt/native/xcode/framework_paths.rb +54 -0
- data/lib/cocoapods-tt/native/xcode/linkage_analyzer.rb +22 -0
- data/lib/cocoapods-tt/native/xcode/xcframework/xcframework_slice.rb +138 -0
- data/lib/cocoapods-tt/native/xcode/xcframework.rb +99 -0
- data/lib/cocoapods-tt/native/xcode.rb +7 -0
- data/lib/cocoapods-tt.rb +1 -0
- data/lib/cocoapods_plugin.rb +17 -0
- metadata +193 -0
@@ -0,0 +1,363 @@
|
|
1
|
+
module Pod
|
2
|
+
module Generator
|
3
|
+
# Stores the common logic for creating app targets within projects including
|
4
|
+
# generating standard import and main files for app hosts.
|
5
|
+
#
|
6
|
+
module AppTargetHelper
|
7
|
+
# Adds a single app target to the given project with the provided name.
|
8
|
+
#
|
9
|
+
# @param [Project] project
|
10
|
+
# the Xcodeproj to generate the target into.
|
11
|
+
#
|
12
|
+
# @param [Symbol] platform_name
|
13
|
+
# the platform of the target. Can be `:ios` or `:osx`, etc.
|
14
|
+
#
|
15
|
+
# @param [String] deployment_target
|
16
|
+
# the deployment target for the platform.
|
17
|
+
#
|
18
|
+
# @param [String] name
|
19
|
+
# The name to use for the target, defaults to 'App'.
|
20
|
+
#
|
21
|
+
# @param [String] product_basename
|
22
|
+
# The product basename to use for the target, defaults to `name`.
|
23
|
+
#
|
24
|
+
# @return [PBXNativeTarget] the new target that was created.
|
25
|
+
#
|
26
|
+
def self.add_app_target(project, platform_name, deployment_target, name = 'App', product_basename = nil)
|
27
|
+
project.new_target(:application, name, platform_name, deployment_target, nil,
|
28
|
+
nil, product_basename)
|
29
|
+
end
|
30
|
+
|
31
|
+
# Creates and links an import file for the given pod target and into the given native target.
|
32
|
+
#
|
33
|
+
# @param [Project] project
|
34
|
+
# the Xcodeproj to generate the target into.
|
35
|
+
#
|
36
|
+
# @param [PBXNativeTarget] target
|
37
|
+
# the native target to link the generated import file into.
|
38
|
+
#
|
39
|
+
# @param [PodTarget] pod_target
|
40
|
+
# the pod target to use for when generating the contents of the import file.
|
41
|
+
#
|
42
|
+
# @param [Symbol] platform
|
43
|
+
# the platform of the target. Can be `:ios` or `:osx`, etc.
|
44
|
+
#
|
45
|
+
# @param [String] name
|
46
|
+
# The name to use for the target, defaults to 'App'.
|
47
|
+
#
|
48
|
+
# @return [Array<PBXBuildFile>] the created build file references.
|
49
|
+
#
|
50
|
+
def self.add_app_project_import(project, target, pod_target, platform, name = 'App')
|
51
|
+
source_file = AppTargetHelper.create_app_import_source_file(project, pod_target, platform, name)
|
52
|
+
group = project[name] || project.new_group(name, name)
|
53
|
+
source_file_ref = group.new_file(source_file)
|
54
|
+
target.add_file_references([source_file_ref])
|
55
|
+
end
|
56
|
+
|
57
|
+
# Creates and links an empty Swift file for the given target.
|
58
|
+
#
|
59
|
+
# @param [Project] project
|
60
|
+
# the Xcodeproj to generate the target into.
|
61
|
+
#
|
62
|
+
# @param [PBXNativeTarget] target
|
63
|
+
# the native target to link the generated import file into.
|
64
|
+
#
|
65
|
+
# @param [String] name
|
66
|
+
# The name to use for the target, defaults to 'App'.
|
67
|
+
#
|
68
|
+
# @return [Array<PBXBuildFile>] the created build file references.
|
69
|
+
#
|
70
|
+
def self.add_empty_swift_file(project, target, name = 'App')
|
71
|
+
swift_file = project.path.dirname.+("#{name}/dummy.swift")
|
72
|
+
swift_file.parent.mkpath
|
73
|
+
File.write(swift_file, '')
|
74
|
+
group = project[name] || project.new_group(name, name)
|
75
|
+
swift_file_ref = group.new_file(swift_file)
|
76
|
+
target.add_file_references([swift_file_ref])
|
77
|
+
end
|
78
|
+
|
79
|
+
# Creates and links a default app host 'main.m' file.
|
80
|
+
#
|
81
|
+
# @param [Project] project
|
82
|
+
# the Xcodeproj to generate the main file into.
|
83
|
+
#
|
84
|
+
# @param [PBXNativeTarget] target
|
85
|
+
# the native target to link the generated main file into.
|
86
|
+
#
|
87
|
+
# @param [Symbol] platform
|
88
|
+
# the platform of the target. Can be `:ios` or `:osx`, etc.
|
89
|
+
#
|
90
|
+
# @param [String] name
|
91
|
+
# The name to use for the target, defaults to 'App'.
|
92
|
+
#
|
93
|
+
# @return [Array<PBXBuildFile>] the created build file references.
|
94
|
+
#
|
95
|
+
def self.add_app_host_main_file(project, target, platform, group, name = 'App')
|
96
|
+
source_file = AppTargetHelper.create_app_host_main_file(project, platform, name)
|
97
|
+
source_file_ref = group.new_file(source_file)
|
98
|
+
target.add_file_references([source_file_ref])
|
99
|
+
end
|
100
|
+
|
101
|
+
# Creates a default launchscreen storyboard.
|
102
|
+
#
|
103
|
+
# @param [Project] project
|
104
|
+
# the Xcodeproj to generate the launchscreen storyboard into.
|
105
|
+
#
|
106
|
+
# @param [PBXNativeTarget] target
|
107
|
+
# the native target to link the generated launchscreen storyboard into.
|
108
|
+
#
|
109
|
+
# @param [Symbol] platform
|
110
|
+
# the platform of the target. Can be `:ios` or `:osx`, etc.
|
111
|
+
#
|
112
|
+
# @param [String] deployment_target
|
113
|
+
# the deployment target for the platform.
|
114
|
+
#
|
115
|
+
# @param [String] name
|
116
|
+
# The name to use for the target, defaults to 'App'.
|
117
|
+
#
|
118
|
+
# @return [PBXFileReference] the created file reference of the launchscreen storyboard.
|
119
|
+
#
|
120
|
+
def self.add_launchscreen_storyboard(project, target, group, deployment_target, name = 'App')
|
121
|
+
launch_storyboard_file = AppTargetHelper.create_launchscreen_storyboard_file(project, deployment_target, name)
|
122
|
+
launch_storyboard_ref = group.new_file(launch_storyboard_file)
|
123
|
+
target.resources_build_phase.add_file_reference(launch_storyboard_ref)
|
124
|
+
end
|
125
|
+
|
126
|
+
# Adds the xctest framework search paths into the given target.
|
127
|
+
#
|
128
|
+
# @param [PBXNativeTarget] target
|
129
|
+
# the native target to add XCTest into.
|
130
|
+
#
|
131
|
+
# @return [void]
|
132
|
+
#
|
133
|
+
def self.add_xctest_search_paths(target)
|
134
|
+
requires_libs = target.platform_name == :ios &&
|
135
|
+
Version.new(target.deployment_target) < Version.new('12.2')
|
136
|
+
|
137
|
+
target.build_configurations.each do |configuration|
|
138
|
+
framework_search_paths = configuration.build_settings['FRAMEWORK_SEARCH_PATHS'] ||= '$(inherited)'
|
139
|
+
framework_search_paths << ' "$(PLATFORM_DIR)/Developer/Library/Frameworks"'
|
140
|
+
|
141
|
+
if requires_libs
|
142
|
+
library_search_paths = configuration.build_settings['LIBRARY_SEARCH_PATHS'] ||= '$(inherited)'
|
143
|
+
library_search_paths << ' "$(PLATFORM_DIR)/Developer/usr/lib"'
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
# Adds the provided swift version into the given target.
|
149
|
+
#
|
150
|
+
# @param [PBXNativeTarget] target
|
151
|
+
# the native target to add the swift version into.
|
152
|
+
#
|
153
|
+
# @param [String] swift_version
|
154
|
+
# the swift version to set to.
|
155
|
+
#
|
156
|
+
# @return [void]
|
157
|
+
#
|
158
|
+
def self.add_swift_version(target, swift_version)
|
159
|
+
raise 'Cannot set empty Swift version to target.' if swift_version.blank?
|
160
|
+
target.build_configurations.each do |configuration|
|
161
|
+
configuration.build_settings['SWIFT_VERSION'] = swift_version
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
# Creates a default import file for the given pod target.
|
166
|
+
#
|
167
|
+
# @param [Project] project
|
168
|
+
# the Xcodeproj to generate the target into.
|
169
|
+
#
|
170
|
+
# @param [PodTarget] pod_target
|
171
|
+
# the pod target to use for when generating the contents of the import file.
|
172
|
+
#
|
173
|
+
# @param [Symbol] platform
|
174
|
+
# the platform of the target. Can be `:ios` or `:osx`, etc.
|
175
|
+
#
|
176
|
+
# @param [String] name
|
177
|
+
# The name of the folder to use and save the generated main file.
|
178
|
+
#
|
179
|
+
# @return [Pathname] the new source file that was generated.
|
180
|
+
#
|
181
|
+
def self.create_app_import_source_file(project, pod_target, platform, name = 'App')
|
182
|
+
language = pod_target.uses_swift? ? :swift : :objc
|
183
|
+
|
184
|
+
if language == :swift
|
185
|
+
source_file = project.path.dirname.+("#{name}/main.swift")
|
186
|
+
source_file.parent.mkpath
|
187
|
+
import_statement = pod_target.should_build? && pod_target.defines_module? ? "import #{pod_target.product_module_name}\n" : ''
|
188
|
+
source_file.open('w') { |f| f << import_statement }
|
189
|
+
else
|
190
|
+
source_file = project.path.dirname.+("#{name}/main.m")
|
191
|
+
source_file.parent.mkpath
|
192
|
+
import_statement = if pod_target.should_build? && pod_target.defines_module?
|
193
|
+
"@import #{pod_target.product_module_name};\n"
|
194
|
+
else
|
195
|
+
header_name = "#{pod_target.product_module_name}/#{pod_target.product_module_name}.h"
|
196
|
+
if pod_target.sandbox.public_headers.root.+(header_name).file?
|
197
|
+
"#import <#{header_name}>\n"
|
198
|
+
else
|
199
|
+
''
|
200
|
+
end
|
201
|
+
end
|
202
|
+
source_file.open('w') do |f|
|
203
|
+
f << "@import Foundation;\n"
|
204
|
+
f << "@import UIKit;\n" if platform == :ios || platform == :tvos
|
205
|
+
f << "@import Cocoa;\n" if platform == :osx
|
206
|
+
f << "#{import_statement}int main() {}\n"
|
207
|
+
end
|
208
|
+
end
|
209
|
+
source_file
|
210
|
+
end
|
211
|
+
|
212
|
+
# Creates a default launchscreen storyboard file.
|
213
|
+
#
|
214
|
+
# @param [Project] project
|
215
|
+
# the Xcodeproj to generate the launchscreen storyboard into.
|
216
|
+
#
|
217
|
+
# @param [String] deployment_target
|
218
|
+
# the deployment target for the platform.
|
219
|
+
#
|
220
|
+
# @param [String] name
|
221
|
+
# The name of the folder to use and save the generated launchscreen storyboard file.
|
222
|
+
#
|
223
|
+
# @return [Pathname] the new launchscreen storyboard file that was generated.
|
224
|
+
#
|
225
|
+
def self.create_launchscreen_storyboard_file(project, deployment_target, name = 'App')
|
226
|
+
launch_storyboard_file = project.path.dirname.+("#{name}/LaunchScreen.storyboard")
|
227
|
+
launch_storyboard_file.parent.mkpath
|
228
|
+
if Version.new(deployment_target) >= Version.new('9.0')
|
229
|
+
File.write(launch_storyboard_file, LAUNCHSCREEN_STORYBOARD_CONTENTS)
|
230
|
+
else
|
231
|
+
File.write(launch_storyboard_file, LAUNCHSCREEN_STORYBOARD_CONTENTS_IOS_8)
|
232
|
+
end
|
233
|
+
launch_storyboard_file
|
234
|
+
end
|
235
|
+
|
236
|
+
# Creates a default app host 'main.m' file.
|
237
|
+
#
|
238
|
+
# @param [Project] project
|
239
|
+
# the Xcodeproj to generate the target into.
|
240
|
+
#
|
241
|
+
# @param [Symbol] platform
|
242
|
+
# the platform of the target. Can be `:ios` or `:osx`.
|
243
|
+
#
|
244
|
+
# @param [String] name
|
245
|
+
# The name of the folder to use and save the generated main file.
|
246
|
+
#
|
247
|
+
# @return [Pathname] the new source file that was generated.
|
248
|
+
#
|
249
|
+
def self.create_app_host_main_file(project, platform, name = 'App')
|
250
|
+
source_file = project.path.dirname.+("#{name}/main.m")
|
251
|
+
source_file.parent.mkpath
|
252
|
+
source_file.open('w') do |f|
|
253
|
+
case platform
|
254
|
+
when :ios, :tvos
|
255
|
+
f << IOS_APP_HOST_MAIN_CONTENTS
|
256
|
+
when :osx
|
257
|
+
f << MACOS_APP_HOST_MAIN_CONTENTS
|
258
|
+
end
|
259
|
+
end
|
260
|
+
source_file
|
261
|
+
end
|
262
|
+
|
263
|
+
IOS_APP_HOST_MAIN_CONTENTS = <<EOS.freeze
|
264
|
+
#import <Foundation/Foundation.h>
|
265
|
+
#import <UIKit/UIKit.h>
|
266
|
+
|
267
|
+
@interface CPTestAppHostAppDelegate : UIResponder <UIApplicationDelegate>
|
268
|
+
|
269
|
+
@property (nonatomic, strong) UIWindow *window;
|
270
|
+
|
271
|
+
@end
|
272
|
+
|
273
|
+
@implementation CPTestAppHostAppDelegate
|
274
|
+
|
275
|
+
- (BOOL)application:(UIApplication *)__unused application didFinishLaunchingWithOptions:(NSDictionary *)__unused launchOptions
|
276
|
+
{
|
277
|
+
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
278
|
+
self.window.rootViewController = [UIViewController new];
|
279
|
+
|
280
|
+
[self.window makeKeyAndVisible];
|
281
|
+
|
282
|
+
return YES;
|
283
|
+
}
|
284
|
+
|
285
|
+
@end
|
286
|
+
|
287
|
+
int main(int argc, char *argv[])
|
288
|
+
{
|
289
|
+
@autoreleasepool
|
290
|
+
{
|
291
|
+
return UIApplicationMain(argc, argv, nil, NSStringFromClass([CPTestAppHostAppDelegate class]));
|
292
|
+
}
|
293
|
+
}
|
294
|
+
EOS
|
295
|
+
|
296
|
+
MACOS_APP_HOST_MAIN_CONTENTS = <<EOS.freeze
|
297
|
+
#import <Cocoa/Cocoa.h>
|
298
|
+
|
299
|
+
int main(int argc, const char * argv[]) {
|
300
|
+
return NSApplicationMain(argc, argv);
|
301
|
+
}
|
302
|
+
EOS
|
303
|
+
|
304
|
+
LAUNCHSCREEN_STORYBOARD_CONTENTS_IOS_8 = <<-XML.strip_heredoc.freeze
|
305
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
306
|
+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" systemVersion="17A277" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
307
|
+
<dependencies>
|
308
|
+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
|
309
|
+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
310
|
+
</dependencies>
|
311
|
+
<scenes>
|
312
|
+
<!--View Controller-->
|
313
|
+
<scene sceneID="EHf-IW-A2E">
|
314
|
+
<objects>
|
315
|
+
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
316
|
+
<layoutGuides>
|
317
|
+
<viewControllerLayoutGuide type="top" id="rUq-ht-380"/>
|
318
|
+
<viewControllerLayoutGuide type="bottom" id="a9l-8d-mfx"/>
|
319
|
+
</layoutGuides>
|
320
|
+
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
321
|
+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
322
|
+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
323
|
+
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
324
|
+
</view>
|
325
|
+
</viewController>
|
326
|
+
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
327
|
+
</objects>
|
328
|
+
<point key="canvasLocation" x="53" y="375"/>
|
329
|
+
</scene>
|
330
|
+
</scenes>
|
331
|
+
</document>
|
332
|
+
XML
|
333
|
+
|
334
|
+
LAUNCHSCREEN_STORYBOARD_CONTENTS = <<-XML.strip_heredoc.freeze
|
335
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
336
|
+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" systemVersion="17A277" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
337
|
+
<dependencies>
|
338
|
+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
|
339
|
+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
340
|
+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
341
|
+
</dependencies>
|
342
|
+
<scenes>
|
343
|
+
<!--View Controller-->
|
344
|
+
<scene sceneID="EHf-IW-A2E">
|
345
|
+
<objects>
|
346
|
+
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
347
|
+
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
348
|
+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
349
|
+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
350
|
+
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
351
|
+
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
|
352
|
+
</view>
|
353
|
+
</viewController>
|
354
|
+
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
355
|
+
</objects>
|
356
|
+
<point key="canvasLocation" x="53" y="375"/>
|
357
|
+
</scene>
|
358
|
+
</scenes>
|
359
|
+
</document>
|
360
|
+
XML
|
361
|
+
end
|
362
|
+
end
|
363
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Pod
|
2
|
+
module Generator
|
3
|
+
class BridgeSupport
|
4
|
+
extend Executable
|
5
|
+
executable :gen_bridge_metadata
|
6
|
+
|
7
|
+
attr_reader :headers
|
8
|
+
|
9
|
+
def initialize(headers)
|
10
|
+
@headers = headers
|
11
|
+
end
|
12
|
+
|
13
|
+
def search_paths
|
14
|
+
@headers.map { |header| "-I '#{header.dirname}'" }.uniq
|
15
|
+
end
|
16
|
+
|
17
|
+
def save_as(pathname)
|
18
|
+
gen_bridge_metadata('-c', search_paths.join(' '), '-o', pathname, *headers)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Pod
|
2
|
+
module Generator
|
3
|
+
# Generates a constant file.
|
4
|
+
#
|
5
|
+
class Constant
|
6
|
+
def initialize(contents)
|
7
|
+
@generate = contents
|
8
|
+
end
|
9
|
+
|
10
|
+
attr_reader :generate
|
11
|
+
|
12
|
+
def save_as(path)
|
13
|
+
path.open('w') do |f|
|
14
|
+
f.write(generate)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module Pod
|
2
|
+
module Generator
|
3
|
+
class CopydSYMsScript
|
4
|
+
# @return [Array<Pathname, String>] dsym_paths the dSYM paths to include in the script contents.
|
5
|
+
#
|
6
|
+
attr_reader :dsym_paths
|
7
|
+
|
8
|
+
# @return [Array<Pathname, String>] bcsymbolmap_paths the bcsymbolmap paths to include in the script contents.
|
9
|
+
#
|
10
|
+
attr_reader :bcsymbolmap_paths
|
11
|
+
|
12
|
+
# Initialize a new instance
|
13
|
+
#
|
14
|
+
# @param [Array<Pathname, String>] dsym_paths @see dsym_paths
|
15
|
+
# @param [Array<Pathname, String>] bcsymbolmap_paths @see bcsymbolmap_paths
|
16
|
+
#
|
17
|
+
def initialize(dsym_paths, bcsymbolmap_paths)
|
18
|
+
@dsym_paths = Array(dsym_paths)
|
19
|
+
@bcsymbolmap_paths = Array(bcsymbolmap_paths)
|
20
|
+
end
|
21
|
+
|
22
|
+
# Saves the copy dSYMs script to the given pathname.
|
23
|
+
#
|
24
|
+
# @param [Pathname] pathname
|
25
|
+
# The path where the copy dSYMs script should be saved.
|
26
|
+
#
|
27
|
+
# @return [void]
|
28
|
+
#
|
29
|
+
def save_as(pathname)
|
30
|
+
pathname.open('w') do |file|
|
31
|
+
file.puts(generate)
|
32
|
+
end
|
33
|
+
File.chmod(0755, pathname.to_s)
|
34
|
+
end
|
35
|
+
|
36
|
+
# @return [String] The generated of the copy dSYMs script.
|
37
|
+
#
|
38
|
+
def generate
|
39
|
+
script = <<-SH.strip_heredoc
|
40
|
+
#{Pod::Generator::ScriptPhaseConstants::DEFAULT_SCRIPT_PHASE_HEADER}
|
41
|
+
#{Pod::Generator::ScriptPhaseConstants::STRIP_INVALID_ARCHITECTURES_METHOD}
|
42
|
+
#{Pod::Generator::ScriptPhaseConstants::RSYNC_PROTECT_TMP_FILES}
|
43
|
+
#{Pod::Generator::ScriptPhaseConstants::INSTALL_DSYM_METHOD}
|
44
|
+
#{Pod::Generator::ScriptPhaseConstants::INSTALL_BCSYMBOLMAP_METHOD}
|
45
|
+
SH
|
46
|
+
dsym_paths.each do |dsym_path|
|
47
|
+
script << %(install_dsym "#{dsym_path}"\n)
|
48
|
+
end
|
49
|
+
bcsymbolmap_paths.each do |bcsymbolmap_path|
|
50
|
+
script << %(install_bcsymbolmap "#{bcsymbolmap_path}"\n)
|
51
|
+
end
|
52
|
+
script
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,223 @@
|
|
1
|
+
module Pod
|
2
|
+
module Generator
|
3
|
+
class CopyResourcesScript
|
4
|
+
# @return [Hash{String, Array{String}] A list of files relative to the
|
5
|
+
# project pods root, keyed by build configuration.
|
6
|
+
#
|
7
|
+
attr_reader :resources_by_config
|
8
|
+
|
9
|
+
# @return [Platform] The platform of the library for which the copy
|
10
|
+
# resources script is needed.
|
11
|
+
#
|
12
|
+
attr_reader :platform
|
13
|
+
|
14
|
+
# Initialize a new instance
|
15
|
+
#
|
16
|
+
# @param [Hash<String, Array<String>>] resources_by_config
|
17
|
+
# @see resources_by_config
|
18
|
+
#
|
19
|
+
# @param [Platform] platform
|
20
|
+
# @see platform
|
21
|
+
#
|
22
|
+
def initialize(resources_by_config, platform)
|
23
|
+
@resources_by_config = resources_by_config
|
24
|
+
@platform = platform
|
25
|
+
end
|
26
|
+
|
27
|
+
# Saves the resource script to the given pathname.
|
28
|
+
#
|
29
|
+
# @param [Pathname] pathname
|
30
|
+
# The path where the copy resources script should be saved.
|
31
|
+
#
|
32
|
+
# @return [void]
|
33
|
+
#
|
34
|
+
def save_as(pathname)
|
35
|
+
pathname.open('w') do |file|
|
36
|
+
file.puts(script)
|
37
|
+
end
|
38
|
+
File.chmod(0755, pathname.to_s)
|
39
|
+
end
|
40
|
+
|
41
|
+
# @return [String] The contents of the copy resources script.
|
42
|
+
#
|
43
|
+
def generate
|
44
|
+
script
|
45
|
+
end
|
46
|
+
|
47
|
+
private
|
48
|
+
|
49
|
+
# @!group Private Helpers
|
50
|
+
|
51
|
+
# @return [Hash{Symbol=>Version}] The minimum deployment target which
|
52
|
+
# supports the `--reference-external-strings-file` option for
|
53
|
+
# the `ibtool` command.
|
54
|
+
#
|
55
|
+
EXTERNAL_STRINGS_FILE_MIMINUM_DEPLOYMENT_TARGET = {
|
56
|
+
:ios => Version.new('6.0'),
|
57
|
+
:osx => Version.new('10.8'),
|
58
|
+
:watchos => Version.new('2.0'),
|
59
|
+
:tvos => Version.new('9.0'),
|
60
|
+
}
|
61
|
+
|
62
|
+
# @return [Bool] Whether the external strings file is supported by the
|
63
|
+
# `ibtool` according to the deployment target of the platform.
|
64
|
+
#
|
65
|
+
def use_external_strings_file?
|
66
|
+
minimum_deployment_target = EXTERNAL_STRINGS_FILE_MIMINUM_DEPLOYMENT_TARGET[platform.name]
|
67
|
+
platform.deployment_target >= minimum_deployment_target
|
68
|
+
end
|
69
|
+
|
70
|
+
# @return [String] The install resources shell function.
|
71
|
+
#
|
72
|
+
def install_resources_function
|
73
|
+
if use_external_strings_file?
|
74
|
+
INSTALL_RESOURCES_FUNCTION
|
75
|
+
else
|
76
|
+
INSTALL_RESOURCES_FUNCTION.gsub(' --reference-external-strings-file', '')
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# @return [String] The contents of the copy resources script.
|
81
|
+
#
|
82
|
+
def script
|
83
|
+
# Define install function
|
84
|
+
script = install_resources_function
|
85
|
+
|
86
|
+
# Call function for each configuration-dependent resource
|
87
|
+
resources_by_config.each do |config, resources|
|
88
|
+
unless resources.empty?
|
89
|
+
script += %(if [[ "$CONFIGURATION" == "#{config}" ]]; then\n)
|
90
|
+
resources.each do |resource|
|
91
|
+
script += %( install_resource "#{resource}"\n)
|
92
|
+
end
|
93
|
+
script += "fi\n"
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
script += RSYNC_CALL
|
98
|
+
script += XCASSETS_COMPILE
|
99
|
+
script
|
100
|
+
end
|
101
|
+
|
102
|
+
INSTALL_RESOURCES_FUNCTION = <<EOS
|
103
|
+
#{Pod::Generator::ScriptPhaseConstants::DEFAULT_SCRIPT_PHASE_HEADER}
|
104
|
+
if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then
|
105
|
+
# If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy
|
106
|
+
# resources to, so exit 0 (signalling the script phase was successful).
|
107
|
+
exit 0
|
108
|
+
fi
|
109
|
+
|
110
|
+
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
111
|
+
|
112
|
+
RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt
|
113
|
+
> "$RESOURCES_TO_COPY"
|
114
|
+
|
115
|
+
XCASSET_FILES=()
|
116
|
+
|
117
|
+
#{Pod::Generator::ScriptPhaseConstants::RSYNC_PROTECT_TMP_FILES}
|
118
|
+
case "${TARGETED_DEVICE_FAMILY:-}" in
|
119
|
+
1,2)
|
120
|
+
TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone"
|
121
|
+
;;
|
122
|
+
1)
|
123
|
+
TARGET_DEVICE_ARGS="--target-device iphone"
|
124
|
+
;;
|
125
|
+
2)
|
126
|
+
TARGET_DEVICE_ARGS="--target-device ipad"
|
127
|
+
;;
|
128
|
+
3)
|
129
|
+
TARGET_DEVICE_ARGS="--target-device tv"
|
130
|
+
;;
|
131
|
+
4)
|
132
|
+
TARGET_DEVICE_ARGS="--target-device watch"
|
133
|
+
;;
|
134
|
+
*)
|
135
|
+
TARGET_DEVICE_ARGS="--target-device mac"
|
136
|
+
;;
|
137
|
+
esac
|
138
|
+
|
139
|
+
install_resource()
|
140
|
+
{
|
141
|
+
if [[ "$1" = /* ]] ; then
|
142
|
+
RESOURCE_PATH="$1"
|
143
|
+
else
|
144
|
+
RESOURCE_PATH="${PODS_ROOT}/$1"
|
145
|
+
fi
|
146
|
+
if [[ ! -e "$RESOURCE_PATH" ]] ; then
|
147
|
+
cat << EOM
|
148
|
+
error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script.
|
149
|
+
EOM
|
150
|
+
exit 1
|
151
|
+
fi
|
152
|
+
case $RESOURCE_PATH in
|
153
|
+
*\.storyboard)
|
154
|
+
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \\"$RESOURCE_PATH\\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
|
155
|
+
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \\"$RESOURCE_PATH\\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
|
156
|
+
;;
|
157
|
+
*\.xib)
|
158
|
+
echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \\"$RESOURCE_PATH\\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true
|
159
|
+
ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \\"$RESOURCE_PATH\\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS}
|
160
|
+
;;
|
161
|
+
*.framework)
|
162
|
+
echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
|
163
|
+
mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
|
164
|
+
echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true
|
165
|
+
rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
|
166
|
+
;;
|
167
|
+
*.xcdatamodel)
|
168
|
+
echo "xcrun momc \\"$RESOURCE_PATH\\" \\"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\\"" || true
|
169
|
+
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom"
|
170
|
+
;;
|
171
|
+
*.xcdatamodeld)
|
172
|
+
echo "xcrun momc \\"$RESOURCE_PATH\\" \\"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\\"" || true
|
173
|
+
xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd"
|
174
|
+
;;
|
175
|
+
*.xcmappingmodel)
|
176
|
+
echo "xcrun mapc \\"$RESOURCE_PATH\\" \\"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\\"" || true
|
177
|
+
xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm"
|
178
|
+
;;
|
179
|
+
*.xcassets)
|
180
|
+
ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH"
|
181
|
+
XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE")
|
182
|
+
;;
|
183
|
+
*)
|
184
|
+
echo "$RESOURCE_PATH" || true
|
185
|
+
echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY"
|
186
|
+
;;
|
187
|
+
esac
|
188
|
+
}
|
189
|
+
EOS
|
190
|
+
|
191
|
+
RSYNC_CALL = <<EOS
|
192
|
+
|
193
|
+
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
194
|
+
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
195
|
+
if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then
|
196
|
+
mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
197
|
+
rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
198
|
+
fi
|
199
|
+
rm -f "$RESOURCES_TO_COPY"
|
200
|
+
EOS
|
201
|
+
|
202
|
+
XCASSETS_COMPILE = <<EOS
|
203
|
+
|
204
|
+
if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ]
|
205
|
+
then
|
206
|
+
# Find all other xcassets (this unfortunately includes those of path pods and other targets).
|
207
|
+
OTHER_XCASSETS=$(find -L "$PWD" -iname "*.xcassets" -type d)
|
208
|
+
while read line; do
|
209
|
+
if [[ $line != "${PODS_ROOT}*" ]]; then
|
210
|
+
XCASSET_FILES+=("$line")
|
211
|
+
fi
|
212
|
+
done <<<"$OTHER_XCASSETS"
|
213
|
+
|
214
|
+
if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then
|
215
|
+
printf "%s\\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}"
|
216
|
+
else
|
217
|
+
printf "%s\\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist"
|
218
|
+
fi
|
219
|
+
fi
|
220
|
+
EOS
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|