cocoapods-bb-xcframework 0.2.6.5 → 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: 1a83d3846da44025ba26e03b0953dbb3d040ea22ea08a845ab3709b1abc221bc
4
- data.tar.gz: 7d74a47b3749e010bb1a9c0415f7fd1985e8c5c2bb9d3318e37b9f34b36383e8
3
+ metadata.gz: b0b8247f09ae9e9a153bdbf204ea123bec0ad7ac63d40673f51fe6c282d02c23
4
+ data.tar.gz: 6473f2b2995b8474794979db49c6497bf21f3ec31af77cbd47619f294aca8d38
5
5
  SHA512:
6
- metadata.gz: e9c77d4c42bdcb027d279915f678411b320598983b57c955dc47cd6af915e359484ab174b5748c0226f85e19fc974779b2ead6a10ef5847a85249705ae785edf
7
- data.tar.gz: 95605f64168e45a6fcb68337176bc7879aba2b70b8461dab47c392cd23c45a72aef1045090791a47077a4d59dc429bfb8148d90fa1f7f909520f2ddc110e464d
6
+ metadata.gz: b6ca50c209203d62016f6672f348e7d4937b9620fde16a1f1ae7cf3415a2adc161e8c18931ec4a29bed22d6460e2c79097225b690c259ae352f966b30c3a7067
7
+ data.tar.gz: 3e711237af20aea6305694e093664fff7cd66e2cb719326c507d3469008ea4bdd92624f47c5e6dbed2ba3255587be05f53cb292f74f99db622b47bf18a4ed1d2
@@ -1,3 +1,3 @@
1
1
  module CocoapodsXCFramework
2
- VERSION = "0.2.6.5"
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-bb-xcframework
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6.5
4
+ version: 0.2.6.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - humin