pod-builder 2.1.1 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 81ee77b8206a7bda4fb55dd0fe30d3702aa1c9baad18017177b7c05d87ef1ea9
4
- data.tar.gz: 12d28eb2a3b4329a2242bcf0477742178998209f895392ac8e4c6e4bdf234b9c
3
+ metadata.gz: f6e1128204135a976e3e6f670dd87d43cf860c762c953ceb0b892af38a799f6a
4
+ data.tar.gz: cae42cf415e9d728048ab8d4fbcdf615e53511558f955bc6128dd12fc107beb4
5
5
  SHA512:
6
- metadata.gz: 0bd009a46f76cff1a1423b5131e187c22d5cbfd34d0c1c2475f6ce172862ddd3044853e3a7dd1428e7daeb7bcc21cea81d1b449988f0ee34cba3cae6d6cae541
7
- data.tar.gz: b11f54906c2c800623f48775a646cf6a1e8f01faf1ffeeceb64df503785035f67d86b63725413f4feca732d3ddd486e53312e29b5aad58f90428b24d79335128
6
+ metadata.gz: 2550ca69349e42b85a7ff16d72d568b9e8c0bd15a2cf301fc6bf0494d27eba3c78aa44be9ef0c062b0a67344dfa27c2ae03b910272a82cc546e7c5ce432f3cd8
7
+ data.tar.gz: 9deb1429d08fcd8960d829e7e0dd15c2f26ae2c9250f40555938e59c7e86e667c29c7a14852445dbba7071d1d1ed5b447cdaac18803da3c005fdc1c50abd8666
data/README.md CHANGED
@@ -280,9 +280,17 @@ Like `build_settings` but per pod. Pod name can also refer to subspec.
280
280
 
281
281
  Specify which build system to use to compile frameworks. Either `Legacy` (standard build system) or `Latest` (new build system). Default value: `Latest`.
282
282
 
283
- #### `build_xcframeworks`
283
+ #### `build_xcframeworks_all`
284
284
 
285
- Specify if PodBuilder will build .xcframeworks. Will enable `library_evolution_support`. Default value: false
285
+ Specify if PodBuilder should build all pods as .xcframeworks. Will enable `library_evolution_support`. Default value: false
286
+
287
+ #### `build_xcframeworks_exclude`
288
+
289
+ Specify which pods PodBuilder should NOT be built as .xcframeworks when `build_xcframeworks_all` is true. Default value: []
290
+
291
+ #### `build_xcframeworks_include`
292
+
293
+ Specify which pods PodBuilder should be built as .xcframeworks. Will enable `library_evolution_support`. Default value: []
286
294
 
287
295
  #### `library_evolution_support`
288
296
 
@@ -327,11 +335,8 @@ The podspec of the Pod you're trying to build doesn't specify the swift_version
327
335
 
328
336
  ```json
329
337
  "spec_overrides": {
330
- "Google-Mobile-Ads-SDK": {
331
- "module_name": "GoogleMobileAds"
332
- },
333
338
  "PodWithError": {
334
- "swift_version": "5.0"
339
+ "swift_version": "5.3"
335
340
  }
336
341
  }
337
342
  ```
@@ -63,9 +63,21 @@ module PodBuilder
63
63
  pods_to_build_debug = pods_to_build.select { |x| x.build_configuration == "debug" }
64
64
  pods_to_build_release = pods_to_build - pods_to_build_debug
65
65
 
66
+ pods_to_build_debug_xcframework = pods_to_build_debug.select { |x| x.build_xcframework }
67
+ pods_to_build_debug -= pods_to_build_debug_xcframework
68
+
69
+ pods_to_build_release_xcframework = pods_to_build_release.select { |x| x.build_xcframework }
70
+ pods_to_build_release -= pods_to_build_release_xcframework
71
+
66
72
  check_dependencies_build_configurations(all_buildable_items)
67
73
 
68
- podfiles_items = [pods_to_build_debug] + [pods_to_build_release]
74
+ # When building mixed framwork/xcframeworks pods xcframeworks should be built last
75
+ # so that the .xcframework overwrite the .framwork if the same pod needs to be built
76
+ # in both ways.
77
+ # For example we might have configured to build onlt PodA as xcframework, another pod
78
+ # PodB has a dependency to PodA. When Building PodB, PodA gets rebuilt as .framework
79
+ # but then PodA gets rebuilt again as .xcframework overwriting the .framework.
80
+ podfiles_items = [pods_to_build_debug] + [pods_to_build_release] + [pods_to_build_debug_xcframework] + [pods_to_build_release_xcframework]
69
81
 
70
82
  install_using_frameworks = Podfile::install_using_frameworks(analyzer)
71
83
  if Configuration.react_native_project
@@ -79,16 +91,18 @@ module PodBuilder
79
91
  end
80
92
  end
81
93
 
94
+ build_catalyst = should_build_catalyst(installer)
95
+
82
96
  install_result = InstallResult.new
83
97
  podfiles_items.reject { |x| x.empty? }.each do |podfile_items|
84
98
  build_configuration = podfile_items.map(&:build_configuration).uniq.first
85
99
 
86
100
  podfile_items = podfile_items.map { |t| t.recursive_dependencies(all_buildable_items) }.flatten.uniq
87
- podfile_content = Podfile.from_podfile_items(podfile_items, analyzer, build_configuration, install_using_frameworks, Configuration.build_xcframeworks)
101
+
102
+ podfile_content = Podfile.from_podfile_items(podfile_items, analyzer, build_configuration, install_using_frameworks, build_catalyst, podfile_items.first.build_xcframework)
88
103
 
89
104
  install_result += Install.podfile(podfile_content, podfile_items, podfile_items.first.build_configuration)
90
105
 
91
- # remove lockfile which gets unexplicably created
92
106
  FileUtils.rm_f(PodBuilder::basepath("Podfile.lock"))
93
107
  end
94
108
 
@@ -124,6 +138,15 @@ module PodBuilder
124
138
 
125
139
  private
126
140
 
141
+ def self.should_build_catalyst(installer)
142
+ build_settings = installer.analysis_result.targets.map { |t| t.user_project.root_object.targets.map { |u| u.build_configuration_list.build_configurations.map { |v| v.build_settings } } }.flatten
143
+ build_catalyst = build_settings.detect { |t| t["SUPPORTS_MACCATALYST"] == "YES" } != nil
144
+
145
+ puts "\nTo support Catalyst you should enable 'build_xcframeworks' in PodBuilder.json\n".red if build_catalyst && !Configuration.build_xcframeworks
146
+
147
+ return build_catalyst
148
+ end
149
+
127
150
  def self.prepare_defines_modules_override(all_buildable_items)
128
151
  all_buildable_items.each do |item|
129
152
  unless item.defines_module.nil?
@@ -39,19 +39,10 @@ module PodBuilder
39
39
  "ENABLE_BITCODE": "NO"
40
40
  }
41
41
  }.freeze
42
- DEFAULT_SKIP_PODS = ["GoogleMaps", "React-RCTFabric", "React-Core", "React-CoreModules"] # Not including React-RCTNetwork might loose some debug warnings
43
-
44
- DEFAULT_FORCE_PREBUILD_PODS = []
45
- DEFAULT_BUILD_SYSTEM = "Latest".freeze # either Latest (New build system) or Legacy (Standard build system)
46
- DEFAULT_LIBRARY_EVOLUTION_SUPPORT = false
47
- DEFAULT_PLATFORMS = ["iphoneos", "iphonesimulator", "appletvos", "appletvsimulator"].freeze
48
- DEFAULT_BUILD_USING_REPO_PATHS = false
49
- DEFAULT_BUILD_XCFRAMEWORKS = false
50
42
 
51
43
  private_constant :DEFAULT_BUILD_SETTINGS
52
44
  private_constant :DEFAULT_BUILD_SETTINGS_OVERRIDES
53
- private_constant :DEFAULT_BUILD_SYSTEM
54
- private_constant :DEFAULT_LIBRARY_EVOLUTION_SUPPORT
45
+ private_constant :DEFAULT_SPEC_OVERRIDE
55
46
 
56
47
  class <<self
57
48
  attr_accessor :allow_building_development_pods
@@ -81,19 +72,22 @@ module PodBuilder
81
72
  attr_accessor :build_using_repo_paths
82
73
  attr_accessor :react_native_project
83
74
  attr_accessor :lldbinit_name
84
- attr_accessor :build_xcframeworks
75
+ attr_accessor :build_xcframeworks_all
76
+ attr_accessor :build_xcframeworks_include
77
+ attr_accessor :build_xcframeworks_exclude
85
78
  end
86
-
87
- @allow_building_development_pods = false
79
+
88
80
  @build_settings = DEFAULT_BUILD_SETTINGS
89
81
  @build_settings_overrides = DEFAULT_BUILD_SETTINGS_OVERRIDES
90
- @build_system = DEFAULT_BUILD_SYSTEM
91
- @library_evolution_support = DEFAULT_LIBRARY_EVOLUTION_SUPPORT
92
- @base_path = "PodBuilder" # Not nice. This value is used only for initial initization. Once config is loaded it will be an absolute path. FIXME
93
82
  @spec_overrides = DEFAULT_SPEC_OVERRIDE
83
+
84
+ @allow_building_development_pods = false
85
+ @build_system = "Latest".freeze # either Latest (New build system) or Legacy (Standard build system)
86
+ @library_evolution_support = false
87
+ @base_path = "PodBuilder" # Not nice. This value is used only for initial initization. Once config is loaded it will be an absolute path. FIXME
94
88
  @skip_licenses = []
95
- @skip_pods = DEFAULT_SKIP_PODS
96
- @force_prebuild_pods = DEFAULT_FORCE_PREBUILD_PODS
89
+ @skip_pods = ["GoogleMaps", "React-RCTFabric", "React-Core", "React-CoreModules"] # Not including React-RCTNetwork might loose some debug warnings
90
+ @force_prebuild_pods = []
97
91
  @license_filename = "Pods-acknowledgements"
98
92
  @development_pods_paths = []
99
93
  @build_base_path = "/tmp/pod_builder".freeze
@@ -110,11 +104,13 @@ module PodBuilder
110
104
  @use_bundler = false
111
105
  @deterministic_build = false
112
106
 
113
- @supported_platforms = DEFAULT_PLATFORMS
114
- @build_using_repo_paths = DEFAULT_BUILD_USING_REPO_PATHS
107
+ @supported_platforms = ["iphoneos", "iphonesimulator", "appletvos", "appletvsimulator"].freeze
108
+ @build_using_repo_paths = false
115
109
  @react_native_project = false
116
110
 
117
- @build_xcframeworks = DEFAULT_BUILD_XCFRAMEWORKS
111
+ @build_xcframeworks_all = false
112
+ @build_xcframeworks_include = []
113
+ @build_xcframeworks_exclude = []
118
114
 
119
115
  def self.check_inited
120
116
  raise "\n\nNot inited, run `pod_builder init`\n".red if podbuilder_path.nil?
@@ -218,12 +214,22 @@ module PodBuilder
218
214
  Configuration.react_native_project = value
219
215
  end
220
216
  end
221
- if value = json["build_xcframeworks"]
217
+ if value = json["build_xcframeworks_all"]
222
218
  if [TrueClass, FalseClass].include?(value.class)
223
- Configuration.build_xcframeworks = value
219
+ Configuration.build_xcframeworks_all = value
224
220
  end
225
221
  end
226
-
222
+ if value = json["build_xcframeworks_include"]
223
+ if value.is_a?(Array)
224
+ Configuration.build_xcframeworks_include = value
225
+ end
226
+ end
227
+ if value = json["build_xcframeworks_exclude"]
228
+ if value.is_a?(Array)
229
+ Configuration.build_xcframeworks_exclude = value
230
+ end
231
+ end
232
+
227
233
  Configuration.build_settings.freeze
228
234
 
229
235
  sanity_check()
@@ -279,6 +285,11 @@ module PodBuilder
279
285
  puts "PodBuilder.json contains '#{pod}' both in `force_prebuild_pods` and `skip_pods`. Will force prebuilding.".yellow
280
286
  end
281
287
  end
288
+ if Configuration.build_xcframeworks_all
289
+ raise "Invalid PodBuilder.json configuration: 'build_xcframeworks_all' is true and 'build_xcframeworks_include' is not empty" if Configuration.build_xcframeworks_include.count > 0
290
+ else
291
+ raise "Invalid PodBuilder.json configuration: 'build_xcframeworks_all' is false and 'build_xcframeworks_exclude' is not empty" if Configuration.build_xcframeworks_exclude.count > 0
292
+ end
282
293
  end
283
294
 
284
295
  def self.config_path
@@ -379,6 +379,7 @@ module PodBuilder
379
379
  pod_names.each do |pod_name|
380
380
  root_name = pod_name.split("/").first
381
381
 
382
+ # Remove existing files
382
383
  items_to_delete = Dir.glob("#{PodBuilder::prebuiltpath(root_name)}/**/*")
383
384
  items_to_delete.each { |t| PodBuilder::safe_rm_rf(t) }
384
385
  end
@@ -393,6 +394,14 @@ module PodBuilder
393
394
  next
394
395
  end
395
396
 
397
+ if podfile_item = podfile_items.detect { |t| t.root_name == pod_name }
398
+ if Dir.glob("#{source_path}/**/Modules/**/*.swiftmodule/*.swiftinterface").count > 0
399
+ # We can safely remove .swiftmodule if .swiftinterface exists
400
+ swiftmodule_files = Dir.glob("#{source_path}/**/Modules/**/*.swiftmodule/*.swiftmodule")
401
+ swiftmodule_files.each { |t| PodBuilder::safe_rm_rf(t) }
402
+ end
403
+ end
404
+
396
405
  unless Dir.glob("#{source_path}/**/*").select { |t| File.file?(t) }.empty?
397
406
  destination_folder = PodBuilder::prebuiltpath(root_name)
398
407
  FileUtils.mkdir_p(destination_folder)
@@ -5,7 +5,7 @@ module PodBuilder
5
5
 
6
6
  PRE_INSTALL_ACTIONS = ["Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_duplicate_framework_and_library_names) {}", "require 'pod_builder/podfile/pre_actions_swizzles'"].freeze
7
7
 
8
- def self.from_podfile_items(items, analyzer, build_configuration, install_using_frameworks, build_xcframeworks)
8
+ def self.from_podfile_items(items, analyzer, build_configuration, install_using_frameworks, build_catalyst, build_xcframeworks)
9
9
  raise "\n\nno items".red unless items.count > 0
10
10
 
11
11
  sources = analyzer.sources
@@ -18,7 +18,8 @@ module PodBuilder
18
18
  podfile.sub!("%%%use_frameworks%%%", install_using_frameworks ? "use_frameworks!" : "use_modular_headers!")
19
19
  podfile.sub!("%%%uses_frameworks%%%", install_using_frameworks ? "true" : "false")
20
20
  podfile.sub!("%%%build_xcframeworks%%%", build_xcframeworks ? "true" : "false")
21
-
21
+ podfile.sub!("%%%build_catalyst%%%", build_catalyst ? "true" : "false")
22
+
22
23
  podfile.sub!("%%%platform_name%%%", platform.name.to_s)
23
24
  podfile.sub!("%%%deployment_version%%%", platform.deployment_target.version)
24
25
 
@@ -40,6 +41,9 @@ module PodBuilder
40
41
  build_settings["ONLY_ACTIVE_ARCH"] = "NO"
41
42
  build_settings["DEBUG_INFORMATION_FORMAT"] = "dwarf-with-dsym"
42
43
 
44
+ # https://thi.imhttps://thi.im/posts/swift-serialize-debugging-options/
45
+ build_settings["SWIFT_SERIALIZE_DEBUGGING_OPTIONS"] = "NO"
46
+
43
47
  build_settings["IPHONEOS_DEPLOYMENT_TARGET"] = platform.deployment_target.version # Fix compilation warnings on Xcode 12
44
48
 
45
49
  # Don't store .pcm info in binary, see https://forums.swift.org/t/swift-behavior-of-gmodules-and-dsyms/23211/3
@@ -56,11 +60,7 @@ module PodBuilder
56
60
 
57
61
  if Configuration.build_system == "Legacy"
58
62
  build_settings["BUILD_LIBRARY_FOR_DISTRIBUTION"] = "NO"
59
- raise "\n\nCan't enable library evolution support with legacy build system!".red if Configuration.library_evolution_support
60
- elsif Configuration.library_evolution_support
61
- build_settings["BUILD_LIBRARY_FOR_DISTRIBUTION"] = "YES"
62
- end
63
- if Configuration.build_xcframeworks
63
+ elsif Configuration.library_evolution_support || item.build_xcframework
64
64
  build_settings["BUILD_LIBRARY_FOR_DISTRIBUTION"] = "YES"
65
65
  end
66
66
 
@@ -103,27 +103,27 @@ module PodBuilder
103
103
  #
104
104
  attr_accessor :libraries
105
105
 
106
- # @return [String] source_files
106
+ # @return [String] Source_files
107
107
  #
108
108
  attr_accessor :source_files
109
109
 
110
- # @return [String] license
110
+ # @return [String] License
111
111
  #
112
112
  attr_accessor :license
113
113
 
114
- # @return [String] summary
114
+ # @return [String] Summary
115
115
  #
116
116
  attr_accessor :summary
117
117
 
118
- # @return [Hash] source
118
+ # @return [Hash] Source
119
119
  #
120
120
  attr_accessor :source
121
121
 
122
- # @return [Hash] authors
122
+ # @return [Hash] Authors
123
123
  #
124
124
  attr_accessor :authors
125
125
 
126
- # @return [String] homepage
126
+ # @return [String] Homepage
127
127
  #
128
128
  attr_accessor :homepage
129
129
 
@@ -134,6 +134,10 @@ module PodBuilder
134
134
  # @return [Bool] Defines module
135
135
  #
136
136
  attr_accessor :defines_module
137
+
138
+ # @return [Bool] Should build as xcframework
139
+ #
140
+ attr_accessor :build_xcframework
137
141
 
138
142
  # Initialize a new instance
139
143
  #
@@ -235,6 +239,13 @@ module PodBuilder
235
239
  @source = spec.root.attributes_hash.fetch("source", { "git"=>"https://github.com/Subito-it/PodBuilder.git" })
236
240
  @authors = spec.root.attributes_hash.fetch("authors", {"PodBuilder"=>"pod@podbuilder.com"})
237
241
  @homepage = spec.root.attributes_hash.fetch("homepage", "https://github.com/Subito-it/PodBuilder")
242
+
243
+ if Configuration.build_xcframeworks_all
244
+ build_as_xcframework = !Configuration.build_xcframeworks_exclude.include?(@root_name)
245
+ else
246
+ build_as_xcframework = Configuration.build_xcframeworks_include.include?(@root_name)
247
+ end
248
+ @build_xcframework = build_as_xcframework
238
249
  end
239
250
 
240
251
  def pod_specification(all_poditems, parent_spec = nil)
@@ -53,7 +53,11 @@ module PodBuilder
53
53
  resources = []
54
54
  exclude_files = []
55
55
  vendored_frameworks.each do |vendored_framework|
56
- binary_path = Dir.glob(PodBuilder::prebuiltpath("#{item.root_name}/#{vendored_framework}/**/#{File.basename(vendored_framework, ".*")}")).first
56
+ if vendored_framework.end_with?(".xcframework")
57
+ binary_path = Dir.glob(PodBuilder::prebuiltpath("#{item.root_name}/#{vendored_framework}/**/#{File.basename(vendored_framework, ".*")}")).reject { |t| t.include?("simulator") }.first
58
+ else
59
+ binary_path = Dir.glob(PodBuilder::prebuiltpath("#{item.root_name}/#{vendored_framework}/**/#{File.basename(vendored_framework, ".*")}")).first
60
+ end
57
61
 
58
62
  next if binary_path.nil?
59
63
 
@@ -3,6 +3,28 @@ require 'colored'
3
3
  require 'pathname'
4
4
 
5
5
  module PodBuilder
6
+ class XcodeBuildSettings
7
+ attr_reader :platform_name
8
+ attr_reader :build_destination
9
+ attr_reader :configuration
10
+
11
+ def initialize(platform_name, configuration)
12
+ @platform_name = platform_name
13
+ @configuration = configuration
14
+
15
+ case platform_name
16
+ when "iphoneos" then @build_destination = "generic/platform=iOS"
17
+ when "iphonesimulator" then @build_destination = "generic/platform=iOS Simulator"
18
+ when "catalyst" then @build_destination = "platform=macOS,arch=x86_64,variant=Mac Catalyst"
19
+ when "macos" then @build_destination = "generic/platform=OS X"
20
+ when "tvos" then @build_destination = "generic/platform=tvOS"
21
+ when "tvossimulator" then @build_destination = "generic/platform=tvOS Simulator"
22
+ when "watchos" then @build_destination = "generic/platform=watchOS"
23
+ when "watchossimulator" then @build_destination = "generic/platform=watchOS Simulator"
24
+ else raise "\n\nUnknown platform '#{platform_name}'".red end
25
+ end
26
+ end
27
+
6
28
  def self.build_for_iosish_platform_framework(sandbox, build_dir, target, device, simulator, configuration, deterministic_build)
7
29
  dsym_device_folder = File.join(build_dir, "dSYM", device)
8
30
  dsym_simulator_folder = File.join(build_dir, "dSYM", simulator)
@@ -269,6 +291,7 @@ Pod::HooksManager.register('podbuilder-rome', :post_install) do |installer_conte
269
291
  if user_options["pre_compile"]
270
292
  user_options["pre_compile"].call(installer_context)
271
293
  end
294
+ build_catalyst = user_options.fetch('build_catalyst', false)
272
295
  build_xcframeworks = user_options.fetch('build_xcframeworks', false)
273
296
 
274
297
  prebuilt_root_paths = JSON.parse(user_options["prebuilt_root_paths"].gsub('=>', ':'))
@@ -291,23 +314,27 @@ Pod::HooksManager.register('podbuilder-rome', :post_install) do |installer_conte
291
314
  project_path = sandbox_root.parent + 'Pods/Pods.xcodeproj'
292
315
 
293
316
  case target.platform_name
294
- when :ios then platforms = ['iphoneos', 'iphonesimulator']
295
- when :osx then platforms = ['macos']
296
- when :tvos then platforms = ['appletvos', 'appletvsimulator']
297
- when :watchos then platforms = ['watchos', 'watchsimulator']
317
+ when :ios then
318
+ xcodebuild_settings = [PodBuilder::XcodeBuildSettings.new("iphoneos", configuration), PodBuilder::XcodeBuildSettings.new("iphonesimulator", configuration)]
319
+ if build_catalyst
320
+ xcodebuild_settings += [PodBuilder::XcodeBuildSettings.new("catalyst", configuration)]
321
+ end
322
+ when :osx then xcodebuild_settings = [PodBuilder::XcodeBuildSettings.new("macos", configuration)]
323
+ when :tvos then xcodebuild_settings = [PodBuilder::XcodeBuildSettings.new("tvos", configuration), PodBuilder::XcodeBuildSettings.new("tvossimulator", configuration)]
324
+ when :watchos then xcodebuild_settings = [PodBuilder::XcodeBuildSettings.new("watchos", configuration), PodBuilder::XcodeBuildSettings.new("watchossimulator", configuration)]
298
325
  else raise "\n\nUnknown platform '#{target.platform_name}'".red end
299
326
 
300
- platforms.each do |platform|
301
- puts "Building xcframeworks for #{platform}".yellow
302
- raise "\n\n#{platform} xcframework archive failed!".red if !system("xcodebuild archive -project #{project_path.to_s} -scheme Pods-DummyTarget -sdk #{platform} -archivePath '#{build_dir}/#{platform}' SKIP_INSTALL=NO > /dev/null")
327
+ xcodebuild_settings.each do |xcodebuild_setting|
328
+ puts "Building xcframeworks for #{xcodebuild_setting.platform_name}".yellow
329
+ raise "\n\n#{xcodebuild_setting.build_destination} xcframework archive failed!".red if !system("xcodebuild archive -project #{project_path.to_s} -scheme Pods-DummyTarget -configuration #{xcodebuild_setting.configuration} -destination '#{xcodebuild_setting.build_destination}' -archivePath '#{build_dir}/#{xcodebuild_setting.platform_name}' SKIP_INSTALL=NO > /dev/null 2>&1")
303
330
  end
304
331
 
305
- built_items = Dir.glob("#{build_dir}/#{platforms.first}.xcarchive/Products/Library/Frameworks/*").reject { |t| File.basename(t, ".*") == "Pods_DummyTarget" }
332
+ built_items = Dir.glob("#{build_dir}/#{xcodebuild_settings[0].platform_name}.xcarchive/Products/Library/Frameworks/*").reject { |t| File.basename(t, ".*") == "Pods_DummyTarget" }
306
333
 
307
334
  built_items.each do |built_item|
308
335
  built_item_paths = [built_item]
309
- platforms.drop(1).each do |platform|
310
- path = "#{build_dir}/#{platform}.xcarchive/Products/Library/Frameworks/#{File.basename(built_item)}"
336
+ xcodebuild_settings.drop(1).each do |xcodebuild_setting|
337
+ path = "#{build_dir}/#{xcodebuild_setting.platform_name}.xcarchive/Products/Library/Frameworks/#{File.basename(built_item)}"
311
338
  if File.directory?(path)
312
339
  built_item_paths.push(path)
313
340
  else
@@ -321,16 +348,16 @@ Pod::HooksManager.register('podbuilder-rome', :post_install) do |installer_conte
321
348
  framework_name = File.basename(built_item_paths.first, ".*")
322
349
  xcframework_path = "#{base_destination}/#{framework_name}/#{framework_name}.xcframework"
323
350
  framework_params = built_item_paths.map { |t| "-framework '#{t}'"}.join(" ")
324
- raise "\n\nFailed packing xcframework!".red if !system("xcodebuild -create-xcframework #{framework_params} -output '#{xcframework_path}' > /dev/null")
351
+ raise "\n\nFailed packing xcframework!".red if !system("xcodebuild -create-xcframework #{framework_params} -output '#{xcframework_path}' > /dev/null 2>&1")
325
352
 
326
353
  if enable_dsym
327
- platforms.each do |platform|
328
- dsym_source = "#{build_dir}/#{platform}.xcarchive/dSYMs/"
354
+ xcodebuild_settings.each do |xcodebuild_setting|
355
+ dsym_source = "#{build_dir}/#{xcodebuild_setting.platform_name}.xcarchive/dSYMs/"
329
356
  if File.directory?(dsym_source)
330
357
  destination = sandbox_root.parent + "dSYMs"
331
358
  FileUtils.mkdir_p(destination)
332
359
  FileUtils.mv(dsym_source, destination)
333
- FileUtils.mv("#{destination}/dSYMs", "#{destination}/#{platform}")
360
+ FileUtils.mv("#{destination}/dSYMs", "#{destination}/#{xcodebuild_setting.platform_name}")
334
361
  end
335
362
  end
336
363
  else
@@ -4,7 +4,7 @@ require 'cfpropertylist'
4
4
 
5
5
  %%%use_frameworks%%%
6
6
 
7
- plugin 'podbuilder-rome', { dsym: true, configuration: '%%%build_configuration%%%', uses_frameworks: %%%uses_frameworks%%%, build_xcframeworks: %%%build_xcframeworks%%%, prebuilt_root_paths: '%%%prebuilt_root_paths%%%', pre_compile: Proc.new { |installer|
7
+ plugin 'podbuilder-rome', { dsym: true, configuration: '%%%build_configuration%%%', uses_frameworks: %%%uses_frameworks%%%, build_catalyst: %%%build_catalyst%%%, build_xcframeworks: %%%build_xcframeworks%%%, prebuilt_root_paths: '%%%prebuilt_root_paths%%%', pre_compile: Proc.new { |installer|
8
8
 
9
9
  def set_build_settings(target_name, build_configurations, installer)
10
10
  installer.pods_project.targets.each do |target|
@@ -1,4 +1,4 @@
1
1
  module PodBuilder
2
- VERSION = "2.1.1"
2
+ VERSION = "3.0.1"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pod-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Camin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-22 00:00:00.000000000 Z
11
+ date: 2021-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler