@@ -286,4 +286,78 @@ class EmbedFrameworksScript
286
286
end
287
287
end
288
288
end
289
- end
289
+ end
290
+
291
+ module Pod
292
+ module Generator
293
+ class CopydSYMsScript
294
+ old_method = instance_method ( :generate )
295
+ define_method ( :generate ) do
296
+ script = old_method . bind ( self ) . ( )
297
+ script = script . gsub ( /-av/ , "-r -L -p -t -g -o -D -v" )
298
+ end
299
+ end
300
+ end
301
+ end
302
+
303
+ module Pod
304
+ module Generator
305
+ class CopyXCFrameworksScript
306
+ old_method = instance_method ( :script )
307
+ define_method ( :script ) do
308
+ script = old_method . bind ( self ) . ( )
309
+ script = script . gsub ( /-av/ , "-r -L -p -t -g -o -D -v" )
310
+ end
311
+ end
312
+ end
313
+ end
314
+
315
+ Pod ::Installer ::Xcode ::PodsProjectGenerator ::PodTargetInstaller . define_singleton_method ( :dsym_paths ) do |target |
316
+ dsym_paths = target . framework_paths . values . flatten . reject { |fmwk_path | fmwk_path . dsym_path . nil? } . map ( &:dsym_path )
317
+ dsym_paths . concat ( target . xcframeworks . values . flatten . flat_map { |xcframework | xcframework_dsyms ( xcframework . path ) } )
318
+ dsym_paths . uniq
319
+ end
320
+
321
+ module Pod
322
+ class Installer
323
+ class Xcode
324
+ class PodsProjectGenerator
325
+ class PodTargetIntegrator
326
+ old_method = instance_method ( :add_copy_xcframeworks_script_phase )
327
+ define_method ( :add_copy_xcframeworks_script_phase ) do |native_target |
328
+ script_path = "${PODS_ROOT}/#{ target . copy_xcframeworks_script_path . relative_path_from ( target . sandbox . root ) } "
329
+
330
+ input_paths_by_config = { }
331
+ output_paths_by_config = { }
332
+
333
+ xcframeworks = target . xcframeworks . values . flatten
334
+
335
+ if use_input_output_paths? && !xcframeworks . empty?
336
+ input_file_list_path = target . copy_xcframeworks_script_input_files_path
337
+ input_file_list_relative_path = "${PODS_ROOT}/#{ input_file_list_path . relative_path_from ( target . sandbox . root ) } "
338
+ input_paths_key = UserProjectIntegrator ::TargetIntegrator ::XCFileListConfigKey . new ( input_file_list_path , input_file_list_relative_path )
339
+ input_paths = input_paths_by_config [ input_paths_key ] = [ ]
340
+
341
+ framework_paths = xcframeworks . map { |xcf | "${PODS_ROOT}/#{ xcf . path . relative_path_from ( target . sandbox . root ) } " }
342
+ input_paths . concat framework_paths
343
+
344
+ output_file_list_path = target . copy_xcframeworks_script_output_files_path
345
+ output_file_list_relative_path = "${PODS_ROOT}/#{ output_file_list_path . relative_path_from ( target . sandbox . root ) } "
346
+ output_paths_key = UserProjectIntegrator ::TargetIntegrator ::XCFileListConfigKey . new ( output_file_list_path , output_file_list_relative_path )
347
+ output_paths_by_config [ output_paths_key ] = xcframeworks . map do |xcf |
348
+ "#{ Target ::BuildSettings ::XCFRAMEWORKS_BUILD_DIR_VARIABLE } /#{ xcf . name } "
349
+ end
350
+ end
351
+
352
+ if xcframeworks . empty?
353
+ UserProjectIntegrator ::TargetIntegrator . remove_copy_xcframeworks_script_phase_from_target ( native_target )
354
+ else
355
+ UserProjectIntegrator ::TargetIntegrator . create_or_update_copy_xcframeworks_script_phase_to_target (
356
+ native_target , script_path , input_paths_by_config , output_paths_by_config )
357
+ end
358
+ end
359
+ end
360
+ end
361
+ end
362
+ end
363
+ end
0 commit comments