cocoapods-bb-xcframework 0.2.6.4 → 0.2.6.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b4c60e8964374bb98b58a5aa9ebf315d18cf752cbbf35eebab71ae9bfb68d45
4
- data.tar.gz: '028f3e39db67dcf294124e76eb6800ba634af4c02dc129a73b36daf65cf380d7'
3
+ metadata.gz: b0b8247f09ae9e9a153bdbf204ea123bec0ad7ac63d40673f51fe6c282d02c23
4
+ data.tar.gz: 6473f2b2995b8474794979db49c6497bf21f3ec31af77cbd47619f294aca8d38
5
5
  SHA512:
6
- metadata.gz: 8810dbb80183b22c09ef068f4dbad5a00e83910bc6b6767ecd321ad76b1eb721f582322f1f25343d7d391fc1eacf75faf116622db159245cc3180a0e33b8e3ec
7
- data.tar.gz: 6ee47de50f032f31fe3e57a416042df6da2b48220e2bf42e082c952153ef91bfae5cc93fb24fb71d6de6ecc836a626cc19f2f924bfe333fed6f23efacc67d874
6
+ metadata.gz: b6ca50c209203d62016f6672f348e7d4937b9620fde16a1f1ae7cf3415a2adc161e8c18931ec4a29bed22d6460e2c79097225b690c259ae352f966b30c3a7067
7
+ data.tar.gz: 3e711237af20aea6305694e093664fff7cd66e2cb719326c507d3469008ea4bdd92624f47c5e6dbed2ba3255587be05f53cb292f74f99db622b47bf18a4ed1d2
@@ -1,3 +1,3 @@
1
1
  module CocoapodsXCFramework
2
- VERSION = "0.2.6.4"
2
+ VERSION = "0.2.6.6"
3
3
  end
@@ -312,20 +312,48 @@ module Pod
312
312
  origin_spec_hash = origin_spec.to_hash
313
313
  res_bundle=origin_spec_hash["resource_bundles"]
314
314
  if res_bundle
315
+ puts "s.resources:#{res_bundle}"
315
316
  puts "二进制库不支持动态生成bundle文件,请手动存放bundle文件 参照:s.resources = 'xx.bundle' ".red
316
317
  raise "#{res_bundle}"
317
318
  end
318
- res_bundle=origin_spec_hash["resources"]
319
+ res_bundle = origin_spec_hash["resources"]
319
320
  if res_bundle
320
321
  puts "s.resources:#{res_bundle}"
321
- bundle_path="#{project_dir}/#{res_bundle}"
322
- FileUtils.cp_r(bundle_path,xcframework_path)
322
+ # `resources` may be a String (single path) or an Array (multiple paths)
323
+ res_list = if res_bundle.is_a?(Array)
324
+ res_bundle
325
+ else
326
+ [res_bundle]
327
+ end
328
+
323
329
  xcframework_comp = File.basename(xcframework_path)
324
- bundle_comp = File.basename(res_bundle)
325
- spec_hash["resources"] = "#{xcframework_comp}/#{bundle_comp}" # bundle资源存放规则,xcframework根目录
330
+ fixed_resources = []
331
+
332
+ res_list.each do |res_item|
333
+ next if res_item.nil?
334
+
335
+ # Only handle bundle-style resources here; keep other resource patterns as-is
336
+ if res_item.is_a?(String) && res_item.end_with?(".bundle")
337
+ bundle_path = "#{project_dir}/#{res_item}"
338
+ FileUtils.cp_r(bundle_path, xcframework_path)
339
+ bundle_comp = File.basename(res_item)
340
+ fixed_resources << "#{xcframework_comp}/#{bundle_comp}" # bundle资源存放规则,xcframework根目录
341
+ else
342
+ # For non-bundle resources (e.g. wildcards, asset catalogs), keep the original value
343
+ fixed_resources << res_item
344
+ end
345
+ end
346
+
347
+ # Keep the output type consistent with input: String in, String out; Array in, Array out
348
+ if res_bundle.is_a?(Array)
349
+ spec_hash["resources"] = fixed_resources
350
+ else
351
+ spec_hash["resources"] = fixed_resources.first
352
+ end
326
353
  end
327
354
  puts spec_hash.to_json
328
355
  spec_hash
329
356
  end
357
+
330
358
  end
331
359
  end
@@ -71,12 +71,39 @@ module Pod
71
71
  else
72
72
  command = "xcodebuild #{defines} BUILD_DIR=#{build_dir} BUILD_LIBRARY_FOR_DISTRIBUTION=YES clean build -configuration #{configuration} -alltargets -destination '#{destination}' ARCHS='#{archs}' SKIP_INSTALL=#{skip_install} | xcpretty 2>&1"
73
73
  end
74
- UI.puts("XBuilder command:#{command}")
75
- output = `#{command}`.lines.to_a
76
- Dir.chdir pwd
77
- if $?.exitstatus != 0
78
- Pod::ErrorUtil.error_report command,output
79
- Process.exit -1
74
+ # UI.puts("XBuilder command:#{command}")
75
+ # output = `#{command}`.lines.to_a
76
+ # Dir.chdir pwd
77
+ # if $?.exitstatus != 0
78
+ # Pod::ErrorUtil.error_report command,output
79
+ # Process.exit -1
80
+ # end
81
+
82
+ # --- enhanced logging & reliable failure surfacing ---
83
+ log_dir = File.join(work_dir, 'logs')
84
+ FileUtils.mkdir_p(log_dir)
85
+ scheme_name = (scheme || @spec&.name || 'Pods').to_s
86
+ plat_name = platform.to_s.gsub(/\s+/, '_')
87
+ log_raw = File.join(log_dir, "xcodebuild-#{scheme_name}-#{plat_name}-#{configuration}.raw.log")
88
+
89
+ # Allow disabling xcpretty via env
90
+ use_pretty = ENV['XBUILDER_NOPRETTY'] != '1'
91
+ wrapped = if use_pretty
92
+ "set -o pipefail; #{command} | tee '#{log_raw}' | xcpretty"
93
+ else
94
+ # no pretty: just tee to log and console
95
+ "set -o pipefail; #{command} | tee '#{log_raw}'"
96
+ end
97
+ UI.puts "XBuilder command: #{command}"
98
+ success = system('bash', '-lc', wrapped)
99
+ unless success
100
+ UI.puts "\n** xcodebuild failed — showing last 200 lines of raw log: #{log_raw}".red
101
+ if File.exist?(log_raw)
102
+ tail = `tail -n 200 '#{log_raw}'`
103
+ UI.puts tail
104
+ end
105
+ Pod::ErrorUtil.error_report(command, []) if defined?(Pod::ErrorUtil)
106
+ Process.exit $?.exitstatus.nonzero? || 1
80
107
  end
81
108
  end
82
109
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-bb-xcframework
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6.4
4
+ version: 0.2.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - humin
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-02-28 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: cocoapods
@@ -91,7 +90,6 @@ homepage: https://github.com/humin1102/cocoapods-bb-xcframework
91
90
  licenses:
92
91
  - MIT
93
92
  metadata: {}
94
- post_install_message:
95
93
  rdoc_options: []
96
94
  require_paths:
97
95
  - lib
@@ -106,8 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
104
  - !ruby/object:Gem::Version
107
105
  version: '0'
108
106
  requirements: []
109
- rubygems_version: 3.5.6
110
- signing_key:
107
+ rubygems_version: 3.7.2
111
108
  specification_version: 4
112
109
  summary: 把podspec打包成xcframework的小工具。packager pod to a xcframework
113
110
  test_files: