cocoapods 1.8.4 → 1.9.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +69 -1
  3. data/lib/cocoapods.rb +1 -0
  4. data/lib/cocoapods/command/setup.rb +1 -0
  5. data/lib/cocoapods/executable.rb +1 -1
  6. data/lib/cocoapods/gem_version.rb +1 -1
  7. data/lib/cocoapods/generator/embed_frameworks_script.rb +36 -6
  8. data/lib/cocoapods/generator/prepare_artifacts_script.rb +244 -0
  9. data/lib/cocoapods/installer.rb +6 -5
  10. data/lib/cocoapods/installer/analyzer.rb +137 -59
  11. data/lib/cocoapods/installer/analyzer/pod_variant.rb +27 -12
  12. data/lib/cocoapods/installer/analyzer/pod_variant_set.rb +11 -2
  13. data/lib/cocoapods/installer/project_cache/project_cache_analyzer.rb +10 -2
  14. data/lib/cocoapods/installer/project_cache/project_installation_cache.rb +15 -2
  15. data/lib/cocoapods/installer/project_cache/target_cache_key.rb +7 -5
  16. data/lib/cocoapods/installer/user_project_integrator.rb +1 -10
  17. data/lib/cocoapods/installer/user_project_integrator/target_integrator.rb +100 -19
  18. data/lib/cocoapods/installer/xcode/pods_project_generator.rb +3 -0
  19. data/lib/cocoapods/installer/xcode/pods_project_generator/aggregate_target_installer.rb +29 -4
  20. data/lib/cocoapods/installer/xcode/pods_project_generator/app_host_installer.rb +7 -2
  21. data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb +106 -45
  22. data/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_integrator.rb +68 -1
  23. data/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb +29 -14
  24. data/lib/cocoapods/sandbox/file_accessor.rb +32 -21
  25. data/lib/cocoapods/sources_manager.rb +9 -2
  26. data/lib/cocoapods/target.rb +11 -14
  27. data/lib/cocoapods/target/aggregate_target.rb +78 -18
  28. data/lib/cocoapods/target/build_settings.rb +64 -31
  29. data/lib/cocoapods/target/pod_target.rb +236 -87
  30. data/lib/cocoapods/user_interface/error_report.rb +14 -4
  31. data/lib/cocoapods/validator.rb +2 -0
  32. data/lib/cocoapods/xcode.rb +7 -0
  33. data/lib/cocoapods/{target → xcode}/framework_paths.rb +14 -1
  34. data/lib/cocoapods/xcode/linkage_analyzer.rb +22 -0
  35. data/lib/cocoapods/xcode/xcframework.rb +81 -0
  36. data/lib/cocoapods/xcode/xcframework/xcframework_slice.rb +51 -0
  37. metadata +12 -8
  38. data/lib/cocoapods/target/build_type.rb +0 -139
@@ -32,6 +32,7 @@ module Pod
32
32
  def integrate!
33
33
  UI.section(integration_message) do
34
34
  target_installation_result.non_library_specs_by_native_target.each do |native_target, spec|
35
+ add_prepare_artifacts_script_phase(native_target, spec)
35
36
  add_embed_frameworks_script_phase(native_target, spec)
36
37
  add_copy_resources_script_phase(native_target, spec)
37
38
  UserProjectIntegrator::TargetIntegrator.create_or_update_user_script_phases(script_phases_for_specs(spec), native_target)
@@ -53,6 +54,12 @@ module Pod
53
54
 
54
55
  # Find or create a 'Copy Pods Resources' build phase
55
56
  #
57
+ # @param [PBXNativeTarget] native_target
58
+ # the native target for which to add the copy resources script
59
+ #
60
+ # @param [Pod::Specification] spec
61
+ # the specification to integrate
62
+ #
56
63
  # @return [void]
57
64
  #
58
65
  def add_copy_resources_script_phase(native_target, spec)
@@ -96,7 +103,13 @@ module Pod
96
103
  end
97
104
  end
98
105
 
99
- # Find or create a 'Embed Pods Frameworks' Copy Files Build Phase
106
+ # Find or create a 'Embed Pods Frameworks' Run Script Build Phase
107
+ #
108
+ # @param [PBXNativeTarget] native_target
109
+ # the native target for which to add the embed frameworks script
110
+ #
111
+ # @param [Pod::Specification] spec
112
+ # the specification to integrate
100
113
  #
101
114
  # @return [void]
102
115
  #
@@ -144,6 +157,60 @@ module Pod
144
157
  end
145
158
  end
146
159
 
160
+ # Find or create a 'Prepare Artifacts' Run Script Build Phase
161
+ #
162
+ # @param [PBXNativeTarget] native_target
163
+ # the native target for which to add the prepare artifacts script
164
+ #
165
+ # @param [Pod::Specification] spec
166
+ # the specification to integrate
167
+ #
168
+ # @return [void]
169
+ #
170
+ def add_prepare_artifacts_script_phase(native_target, spec)
171
+ script_path = "${PODS_ROOT}/#{target.prepare_artifacts_script_path_for_spec(spec).relative_path_from(target.sandbox.root)}"
172
+
173
+ input_paths_by_config = {}
174
+ output_paths_by_config = {}
175
+
176
+ dependent_targets = if spec.test_specification?
177
+ target.dependent_targets_for_test_spec(spec)
178
+ else
179
+ target.dependent_targets_for_app_spec(spec)
180
+ end
181
+ host_target_spec_names = target.app_host_dependent_targets_for_spec(spec).flat_map do |pt|
182
+ pt.specs.map(&:name)
183
+ end.uniq
184
+ xcframeworks = dependent_targets.flat_map do |dependent_target|
185
+ spec_paths_to_include = dependent_target.library_specs.map(&:name)
186
+ spec_paths_to_include -= host_target_spec_names
187
+ spec_paths_to_include << spec.name if dependent_target == target
188
+ dependent_target.xcframeworks.values_at(*spec_paths_to_include).flatten.compact
189
+ end.uniq
190
+
191
+ if use_input_output_paths? && !xcframeworks.empty?
192
+ input_file_list_path = target.prepare_artifacts_script_input_files_path_for_spec(spec)
193
+ input_file_list_relative_path = "${PODS_ROOT}/#{input_file_list_path.relative_path_from(target.sandbox.root)}"
194
+ input_paths_key = UserProjectIntegrator::TargetIntegrator::XCFileListConfigKey.new(input_file_list_path, input_file_list_relative_path)
195
+ input_paths = input_paths_by_config[input_paths_key] = [script_path]
196
+
197
+ framework_paths = xcframeworks.map { |xcf| "${PODS_ROOT}/#{xcf.path.relative_path_from(target.sandbox.root)}" }
198
+ input_paths.concat framework_paths
199
+
200
+ output_file_list_path = target.prepare_artifacts_script_output_files_path_for_spec(spec)
201
+ output_file_list_relative_path = "${PODS_ROOT}/#{output_file_list_path.relative_path_from(target.sandbox.root)}"
202
+ output_paths_key = UserProjectIntegrator::TargetIntegrator::XCFileListConfigKey.new(output_file_list_path, output_file_list_relative_path)
203
+ output_paths_by_config[output_paths_key] = [UserProjectIntegrator::TargetIntegrator::ARTIFACT_LIST_FILE]
204
+ end
205
+
206
+ if xcframeworks.empty?
207
+ UserProjectIntegrator::TargetIntegrator.remove_prepare_artifacts_script_phase_from_target(native_target)
208
+ else
209
+ UserProjectIntegrator::TargetIntegrator.create_or_update_prepare_artifacts_script_phase_to_target(
210
+ native_target, script_path, input_paths_by_config, output_paths_by_config)
211
+ end
212
+ end
213
+
147
214
  # @return [String] the message that should be displayed for the target
148
215
  # integration.
149
216
  #
@@ -35,27 +35,32 @@ module Pod
35
35
  @installation_options = installation_options
36
36
  end
37
37
 
38
+ # Writes projects to disk.
39
+ #
40
+ # @yield If provided, this block will execute right before writing the projects to disk.
41
+ #
38
42
  def write!
39
43
  cleanup_projects(projects)
40
44
 
41
45
  projects.each do |project|
42
- UI.message "- Writing Xcode project file to #{UI.path project.path}" do
43
- library_product_types = [:framework, :dynamic_library, :static_library]
44
- results_by_native_target = Hash[pod_target_installation_results.map do |_, result|
45
- [result.native_target, result]
46
- end]
47
- project.recreate_user_schemes(false) do |scheme, target|
48
- next unless target.respond_to?(:symbol_type)
49
- next unless library_product_types.include? target.symbol_type
50
- installation_result = results_by_native_target[target]
51
- next unless installation_result
52
- installation_result.test_native_targets.each do |test_native_target|
53
- scheme.add_test_target(test_native_target)
54
- end
46
+ library_product_types = [:framework, :dynamic_library, :static_library]
47
+ results_by_native_target = Hash[pod_target_installation_results.map do |_, result|
48
+ [result.native_target, result]
49
+ end]
50
+ project.recreate_user_schemes(false) do |scheme, target|
51
+ next unless target.respond_to?(:symbol_type)
52
+ next unless library_product_types.include? target.symbol_type
53
+ installation_result = results_by_native_target[target]
54
+ next unless installation_result
55
+ installation_result.test_native_targets.each do |test_native_target|
56
+ scheme.add_test_target(test_native_target)
55
57
  end
56
- project.save
57
58
  end
58
59
  end
60
+
61
+ yield if block_given?
62
+
63
+ save_projects(projects)
59
64
  end
60
65
 
61
66
  private
@@ -66,7 +71,17 @@ module Pod
66
71
  projects.each do |project|
67
72
  [project.pods, project.support_files_group,
68
73
  project.development_pods, project.dependencies_group].each { |group| group.remove_from_project if group.empty? }
74
+ end
75
+ end
76
+
77
+ # Sorts and then saves projects which writes them to disk.
78
+ #
79
+ def save_projects(projects)
80
+ projects.each do |project|
69
81
  project.sort(:groups_position => :below)
82
+ UI.message "- Writing Xcode project file to #{UI.path project.path}" do
83
+ project.save
84
+ end
70
85
  end
71
86
  end
72
87
  end
@@ -1,4 +1,4 @@
1
- require 'macho'
1
+ require 'cocoapods/xcode/linkage_analyzer'
2
2
 
3
3
  module Pod
4
4
  class Sandbox
@@ -167,8 +167,8 @@ module Pod
167
167
  # that come shipped with the Pod.
168
168
  #
169
169
  def vendored_dynamic_frameworks
170
- vendored_frameworks.select do |framework|
171
- dynamic_binary?(framework + framework.basename('.*'))
170
+ (vendored_frameworks - vendored_xcframeworks).select do |framework|
171
+ Xcode::LinkageAnalyzer.dynamic_binary?(framework + framework.basename('.*'))
172
172
  end
173
173
  end
174
174
 
@@ -176,7 +176,16 @@ module Pod
176
176
  # bundles that come shipped with the Pod.
177
177
  #
178
178
  def vendored_static_frameworks
179
- vendored_frameworks - vendored_dynamic_frameworks
179
+ vendored_frameworks - vendored_dynamic_frameworks - vendored_xcframeworks
180
+ end
181
+
182
+ # @return [Array<Pathname>] The paths of vendored .xcframework bundles
183
+ # that come shipped with the Pod.
184
+ #
185
+ def vendored_xcframeworks
186
+ vendored_frameworks.select do |framework|
187
+ File.extname(framework) == '.xcframework'
188
+ end
180
189
  end
181
190
 
182
191
  # @param [Array<FileAccessor>] file_accessors
@@ -220,13 +229,30 @@ module Pod
220
229
  Pathname.glob(headers_dir + '**/' + GLOB_PATTERNS[:public_header_files])
221
230
  end
222
231
 
232
+ # @param [Pathname] framework
233
+ # The path to the .xcframework
234
+ #
235
+ # @return [Array<Pathname>] The paths to all the headers included in the
236
+ # vendored xcframework
237
+ #
238
+ def self.vendored_xcframework_headers(framework)
239
+ xcframework = Xcode::XCFramework.new(framework)
240
+ xcframework.slices.flat_map do |slice|
241
+ vendored_frameworks_headers(slice.path)
242
+ end
243
+ end
244
+
223
245
  # @return [Array<Pathname>] The paths of the framework headers that come
224
246
  # shipped with the Pod.
225
247
  #
226
248
  def vendored_frameworks_headers
227
- vendored_frameworks.flat_map do |framework|
249
+ paths = (vendored_frameworks - vendored_xcframeworks).flat_map do |framework|
228
250
  self.class.vendored_frameworks_headers(framework)
229
251
  end.uniq
252
+ paths.concat Array.new(vendored_xcframeworks.flat_map do |framework|
253
+ self.class.vendored_xcframework_headers(framework)
254
+ end)
255
+ paths
230
256
  end
231
257
 
232
258
  # @return [Array<Pathname>] The paths of the library bundles that come
@@ -241,7 +267,7 @@ module Pod
241
267
  #
242
268
  def vendored_dynamic_libraries
243
269
  vendored_libraries.select do |library|
244
- dynamic_binary?(library)
270
+ Xcode::LinkageAnalyzer.dynamic_binary?(library)
245
271
  end
246
272
  end
247
273
 
@@ -444,21 +470,6 @@ module Pod
444
470
  path_list.glob(patterns, options).flatten.compact.uniq
445
471
  end
446
472
 
447
- # @param [Pathname] binary
448
- # The file to be checked for being a dynamic Mach-O binary.
449
- #
450
- # @return [Boolean] Whether `binary` can be dynamically linked.
451
- #
452
- def dynamic_binary?(binary)
453
- @cached_dynamic_binary_results ||= {}
454
- return @cached_dynamic_binary_results[binary] unless @cached_dynamic_binary_results[binary].nil?
455
- return false unless binary.file?
456
-
457
- @cached_dynamic_binary_results[binary] = MachO.open(binary).dylib?
458
- rescue MachO::MachOError
459
- @cached_dynamic_binary_results[binary] = false
460
- end
461
-
462
473
  #-----------------------------------------------------------------------#
463
474
  end
464
475
  end
@@ -1,6 +1,8 @@
1
1
  require 'cocoapods-core/source'
2
+ require 'netrc'
2
3
  require 'set'
3
4
  require 'rest'
5
+ require 'typhoeus'
4
6
 
5
7
  module Pod
6
8
  class Source
@@ -68,8 +70,13 @@ module Pod
68
70
  # The URL of the source.
69
71
  #
70
72
  def cdn_url?(url)
71
- url =~ %r{^https:\/\/} &&
72
- REST.head(url + '/all_pods.txt').ok?
73
+ if url =~ %r{^https?:\/\/}
74
+ response = Typhoeus.get(url + '/CocoaPods-version.yml', :netrc_file => Netrc.default_path, :netrc => :optional)
75
+ response.code == 200 && begin
76
+ response_hash = YAML.load(response.body) # rubocop:disable Security/YAMLLoad
77
+ response_hash.is_a?(Hash) && !Source::Metadata.new(response_hash).latest_cocoapods_version.nil?
78
+ end
79
+ end
73
80
  rescue => e
74
81
  raise Informative, "Couldn't determine repo type for URL: `#{url}`: #{e}"
75
82
  end
@@ -1,5 +1,4 @@
1
1
  require 'cocoapods/target/build_settings'
2
- require 'cocoapods/target/build_type'
3
2
 
4
3
  module Pod
5
4
  # Model class which describes a Pods target.
@@ -17,12 +16,6 @@ module Pod
17
16
  #
18
17
  attr_reader :sandbox
19
18
 
20
- # @return [Boolean] Whether the target needs to be implemented as a framework.
21
- # Computed by analyzer.
22
- #
23
- attr_reader :host_requires_frameworks
24
- alias_method :host_requires_frameworks?, :host_requires_frameworks
25
-
26
19
  # @return [Hash{String=>Symbol}] A hash representing the user build
27
20
  # configurations where each key corresponds to the name of a
28
21
  # configuration and its value to its type (`:debug` or `:release`).
@@ -41,7 +34,7 @@ module Pod
41
34
  #
42
35
  attr_reader :build_settings
43
36
 
44
- # @return [Target::BuildType] the build type for this target.
37
+ # @return [BuildType] the build type for this target.
45
38
  #
46
39
  attr_reader :build_type
47
40
  private :build_type
@@ -53,15 +46,13 @@ module Pod
53
46
  # Initialize a new target
54
47
  #
55
48
  # @param [Sandbox] sandbox @see #sandbox
56
- # @param [Boolean] host_requires_frameworks @see #host_requires_frameworks
49
+ # @param [BuildType] build_type @see #build_type
57
50
  # @param [Hash{String=>Symbol}] user_build_configurations @see #user_build_configurations
58
51
  # @param [Array<String>] archs @see #archs
59
52
  # @param [Platform] platform @see #platform
60
53
  #
61
- def initialize(sandbox, host_requires_frameworks, user_build_configurations, archs, platform,
62
- build_type: Target::BuildType.infer_from_spec(nil, :host_requires_frameworks => host_requires_frameworks?))
54
+ def initialize(sandbox, build_type, user_build_configurations, archs, platform)
63
55
  @sandbox = sandbox
64
- @host_requires_frameworks = host_requires_frameworks
65
56
  @user_build_configurations = user_build_configurations
66
57
  @archs = archs
67
58
  @platform = platform
@@ -211,7 +202,7 @@ module Pod
211
202
  # @return [String] A string suitable for debugging.
212
203
  #
213
204
  def inspect
214
- "<#{self.class} name=#{name} >"
205
+ "#<#{self.class} name=#{name}>"
215
206
  end
216
207
 
217
208
  #-------------------------------------------------------------------------#
@@ -246,7 +237,7 @@ module Pod
246
237
  #
247
238
  def xcconfig_path(variant = nil)
248
239
  if variant
249
- support_files_dir + "#{label}.#{variant.gsub(File::SEPARATOR, '-').downcase}.xcconfig"
240
+ support_files_dir + "#{label}.#{variant.to_s.gsub(File::SEPARATOR, '-').downcase}.xcconfig"
250
241
  else
251
242
  support_files_dir + "#{label}.xcconfig"
252
243
  end
@@ -314,6 +305,12 @@ module Pod
314
305
  @application_extension_api_only = true
315
306
  end
316
307
 
308
+ # @return [Pathname] The absolute path of the prepare artifacts script.
309
+ #
310
+ def prepare_artifacts_script_path
311
+ support_files_dir + "#{label}-artifacts.sh"
312
+ end
313
+
317
314
  #-------------------------------------------------------------------------#
318
315
 
319
316
  private
@@ -1,4 +1,5 @@
1
- require 'cocoapods/target/framework_paths'
1
+ require 'cocoapods/xcode/framework_paths'
2
+ require 'cocoapods/xcode/xcframework'
2
3
 
3
4
  module Pod
4
5
  # Stores the information relative to the target used to cluster the targets
@@ -56,7 +57,7 @@ module Pod
56
57
  # Initialize a new instance
57
58
  #
58
59
  # @param [Sandbox] sandbox @see Target#sandbox
59
- # @param [Boolean] host_requires_frameworks @see Target#host_requires_frameworks
60
+ # @param [BuildType] build_type @see Target#build_type
60
61
  # @param [Hash{String=>Symbol}] user_build_configurations @see Target#user_build_configurations
61
62
  # @param [Array<String>] archs @see Target#archs
62
63
  # @param [Platform] platform @see #Target#platform
@@ -65,12 +66,10 @@ module Pod
65
66
  # @param [Xcodeproj::Project] user_project @see #user_project
66
67
  # @param [Array<String>] user_target_uuids @see #user_target_uuids
67
68
  # @param [Hash{String=>Array<PodTarget>}] pod_targets_for_build_configuration @see #pod_targets_for_build_configuration
68
- # @param [Target::BuildType] build_type @see #build_type
69
69
  #
70
- def initialize(sandbox, host_requires_frameworks, user_build_configurations, archs, platform, target_definition,
71
- client_root, user_project, user_target_uuids, pod_targets_for_build_configuration,
72
- build_type: Target::BuildType.infer_from_spec(nil, :host_requires_frameworks => host_requires_frameworks))
73
- super(sandbox, host_requires_frameworks, user_build_configurations, archs, platform, :build_type => build_type)
70
+ def initialize(sandbox, build_type, user_build_configurations, archs, platform, target_definition, client_root,
71
+ user_project, user_target_uuids, pod_targets_for_build_configuration)
72
+ super(sandbox, build_type, user_build_configurations, archs, platform)
74
73
  raise "Can't initialize an AggregateTarget without a TargetDefinition!" if target_definition.nil?
75
74
  raise "Can't initialize an AggregateTarget with an abstract TargetDefinition!" if target_definition.abstract?
76
75
  @target_definition = target_definition
@@ -95,8 +94,8 @@ module Pod
95
94
  merged = @pod_targets_for_build_configuration.merge(embedded_pod_targets_for_build_configuration) do |_, before, after|
96
95
  (before + after).uniq
97
96
  end
98
- AggregateTarget.new(sandbox, host_requires_frameworks, user_build_configurations, archs, platform,
99
- target_definition, client_root, user_project, user_target_uuids, merged, :build_type => build_type).tap do |aggregate_target|
97
+ AggregateTarget.new(sandbox, build_type, user_build_configurations, archs, platform,
98
+ target_definition, client_root, user_project, user_target_uuids, merged).tap do |aggregate_target|
100
99
  aggregate_target.search_paths_aggregate_targets.concat(search_paths_aggregate_targets).freeze
101
100
  aggregate_target.mark_application_extension_api_only if application_extension_api_only
102
101
  end
@@ -225,13 +224,20 @@ module Pod
225
224
  !resource_paths_by_config.each_value.all?(&:empty?)
226
225
  end
227
226
 
228
- # @return [Boolean] Whether the target contains framework to be embedded into
227
+ # @return [Boolean] Whether the target contains frameworks to be embedded into
229
228
  # the user target
230
229
  #
231
230
  def includes_frameworks?
232
231
  !framework_paths_by_config.each_value.all?(&:empty?)
233
232
  end
234
233
 
234
+ # @return [Boolean] Whether the target contains xcframeworks to be embedded into
235
+ # the user target
236
+ #
237
+ def includes_xcframeworks?
238
+ !xcframeworks_by_config.each_value.all?(&:empty?)
239
+ end
240
+
235
241
  # @return [Hash{String => Array<FrameworkPaths>}] The vendored dynamic artifacts and framework target
236
242
  # input and output paths grouped by config
237
243
  #
@@ -249,6 +255,23 @@ module Pod
249
255
  end
250
256
  end
251
257
 
258
+ # @return [Hash{String => Array<Xcode::XCFramework>}] The vendored dynamic artifacts and framework target
259
+ # input and output paths grouped by config
260
+ #
261
+ def xcframeworks_by_config
262
+ @xcframeworks_by_config ||= begin
263
+ xcframeworks_by_config = {}
264
+ user_build_configurations.each_key do |config|
265
+ relevant_pod_targets = pod_targets_for_build_configuration(config)
266
+ xcframeworks_by_config[config] = relevant_pod_targets.flat_map do |pod_target|
267
+ library_specs = pod_target.library_specs.map(&:name)
268
+ pod_target.xcframeworks.values_at(*library_specs).flatten.compact.uniq
269
+ end
270
+ end
271
+ xcframeworks_by_config
272
+ end
273
+ end
274
+
252
275
  # @return [Hash{String => Array<String>}] Uniqued Resources grouped by config
253
276
  #
254
277
  def resource_paths_by_config
@@ -294,6 +317,12 @@ module Pod
294
317
  support_files_dir + "#{label}-resources.sh"
295
318
  end
296
319
 
320
+ # @return [Pathname] The absolute path of the embed frameworks script.
321
+ #
322
+ def embed_frameworks_script_path
323
+ support_files_dir + "#{label}-frameworks.sh"
324
+ end
325
+
297
326
  # @param [String] configuration the configuration this path is for.
298
327
  #
299
328
  # @return [Pathname] The absolute path of the copy resources script input file list.
@@ -310,12 +339,6 @@ module Pod
310
339
  support_files_dir + "#{label}-resources-#{configuration}-output-files.xcfilelist"
311
340
  end
312
341
 
313
- # @return [Pathname] The absolute path of the embed frameworks script.
314
- #
315
- def embed_frameworks_script_path
316
- support_files_dir + "#{label}-frameworks.sh"
317
- end
318
-
319
342
  # @param [String] configuration the configuration this path is for.
320
343
  #
321
344
  # @return [Pathname] The absolute path of the embed frameworks script input file list.
@@ -332,6 +355,22 @@ module Pod
332
355
  support_files_dir + "#{label}-frameworks-#{configuration}-output-files.xcfilelist"
333
356
  end
334
357
 
358
+ # @param [String] configuration the configuration this path is for.
359
+ #
360
+ # @return [Pathname] The absolute path of the prepare artifacts script input file list.
361
+ #
362
+ def prepare_artifacts_script_input_files_path(configuration)
363
+ support_files_dir + "#{label}-artifacts-#{configuration}-input-files.xcfilelist"
364
+ end
365
+
366
+ # @param [String] configuration the configuration this path is for.
367
+ #
368
+ # @return [Pathname] The absolute path of the prepare artifacts script output file list.
369
+ #
370
+ def prepare_artifacts_script_output_files_path(configuration)
371
+ support_files_dir + "#{label}-artifacts-#{configuration}-output-files.xcfilelist"
372
+ end
373
+
335
374
  # @return [String] The output file path fo the check manifest lock script.
336
375
  #
337
376
  def check_manifest_lock_script_output_file_path
@@ -411,6 +450,27 @@ module Pod
411
450
  "${PODS_ROOT}/#{relative_to_pods_root(embed_frameworks_script_output_files_path('${CONFIGURATION}'))}"
412
451
  end
413
452
 
453
+ # @return [String] The path of the prepare artifacts script relative to the
454
+ # root of the Pods project.
455
+ #
456
+ def prepare_artifacts_script_relative_path
457
+ "${PODS_ROOT}/#{relative_to_pods_root(prepare_artifacts_script_path)}"
458
+ end
459
+
460
+ # @return [String] The path of the prepare artifacts script input file list
461
+ # relative to the root of the Pods project.
462
+ #
463
+ def prepare_artifacts_script_input_files_relative_path
464
+ "${PODS_ROOT}/#{relative_to_pods_root(prepare_artifacts_script_input_files_path('${CONFIGURATION}'))}"
465
+ end
466
+
467
+ # @return [String] The path of the prepare artifacts script output file list
468
+ # relative to the root of the Pods project.
469
+ #
470
+ def prepare_artifacts_script_output_files_relative_path
471
+ "${PODS_ROOT}/#{relative_to_pods_root(prepare_artifacts_script_output_files_path('${CONFIGURATION}'))}"
472
+ end
473
+
414
474
  private
415
475
 
416
476
  # @!group Private Helpers
@@ -431,8 +491,8 @@ module Pod
431
491
  def create_build_settings
432
492
  settings = {}
433
493
 
434
- user_build_configurations.each_key do |configuration_name|
435
- settings[configuration_name] = BuildSettings::AggregateTargetSettings.new(self, configuration_name)
494
+ user_build_configurations.each do |configuration_name, configuration|
495
+ settings[configuration_name] = BuildSettings::AggregateTargetSettings.new(self, configuration_name, :configuration => configuration)
436
496
  end
437
497
 
438
498
  settings