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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b0b8247f09ae9e9a153bdbf204ea123bec0ad7ac63d40673f51fe6c282d02c23
|
|
4
|
+
data.tar.gz: 6473f2b2995b8474794979db49c6497bf21f3ec31af77cbd47619f294aca8d38
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b6ca50c209203d62016f6672f348e7d4937b9620fde16a1f1ae7cf3415a2adc161e8c18931ec4a29bed22d6460e2c79097225b690c259ae352f966b30c3a7067
|
|
7
|
+
data.tar.gz: 3e711237af20aea6305694e093664fff7cd66e2cb719326c507d3469008ea4bdd92624f47c5e6dbed2ba3255587be05f53cb292f74f99db622b47bf18a4ed1d2
|
|
@@ -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
|
-
|
|
322
|
-
|
|
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
|
-
|
|
325
|
-
|
|
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
|