xcframework_converter 0.1.1 → 0.1.2
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 +4 -4
- data/lib/xcframework_converter/version.rb +1 -1
- data/lib/xcframework_converter.rb +18 -14
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c41a9ff61dd6eb5eb00492d2ed59d9a235a3d3085189bff9351d9d6ab175e548
|
4
|
+
data.tar.gz: b9784bac37bb57065f29a70bb8ec4a7ae19f6a6716375018d2253bb0d6c362cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0b0c2d69c02d311046d6dcb2e465d0fe18b7e34409cf423f29fe473117232ab3b39c623a90709586d79d1b5caeb2d5be20986bd730b44e2b3da9809338cb7c0
|
7
|
+
data.tar.gz: dcab8fdcf810162e00b70b214bd43c41c61b852e294689c819c1d03a456bed13068cd16e7f9956cff42a19871ac1b8c97a6e77c6273686ef8f524fc69b8c09ec
|
@@ -17,30 +17,34 @@ module XCFrameworkConverter
|
|
17
17
|
class << self
|
18
18
|
def convert_frameworks_to_xcframeworks!(installer)
|
19
19
|
installer.analysis_result.specifications.each do |spec|
|
20
|
-
next
|
20
|
+
next if spec.source && spec.local?
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
frameworks_to_convert = spec.available_platforms.map do |platform|
|
23
|
+
consumer = Pod::Specification::Consumer.new(spec, platform)
|
24
|
+
before_rename = consumer.vendored_frameworks.select { |f| File.extname(f) == '.framework' }
|
25
|
+
next [] if before_rename.empty?
|
26
|
+
|
27
|
+
after_rename = before_rename.map { |f| Pathname.new(f).sub_ext('.xcframework').to_s }
|
28
|
+
proxy = Pod::Specification::DSL::PlatformProxy.new(spec, platform.symbolic_name)
|
29
|
+
proxy.vendored_frameworks = consumer.vendored_frameworks - before_rename + after_rename
|
30
|
+
before_rename
|
31
|
+
end.flatten.uniq
|
32
|
+
|
33
|
+
next if frameworks_to_convert.empty?
|
26
34
|
|
27
35
|
pod_path = installer.sandbox.pod_dir(Pod::Specification.root_name(spec.name))
|
28
|
-
convert_xcframeworks_if_present(pod_path)
|
36
|
+
convert_xcframeworks_if_present(frameworks_to_convert.map { |f| pod_path.join(f) })
|
29
37
|
|
30
|
-
converted_frameworks = unconverted_frameworks.map do |path|
|
31
|
-
Pathname.new(path).sub_ext('.xcframework').to_s
|
32
|
-
end
|
33
|
-
spec.attributes_hash['vendored_frameworks'] = frameworks - unconverted_frameworks + converted_frameworks
|
34
38
|
# some pods put these as a way to NOT support arm64 sim
|
39
|
+
# may stop working if a pod decides to put these in a platform proxy
|
35
40
|
spec.attributes_hash['pod_target_xcconfig']&.delete('EXCLUDED_ARCHS[sdk=iphonesimulator*]')
|
36
41
|
spec.attributes_hash['user_target_xcconfig']&.delete('EXCLUDED_ARCHS[sdk=iphonesimulator*]')
|
37
42
|
end
|
38
43
|
end
|
39
44
|
|
40
|
-
def convert_xcframeworks_if_present(
|
41
|
-
|
42
|
-
|
43
|
-
convert_framework_to_xcframework(path)
|
45
|
+
def convert_xcframeworks_if_present(frameworks_to_convert)
|
46
|
+
frameworks_to_convert.each do |path|
|
47
|
+
convert_framework_to_xcframework(path) if Dir.exist?(path)
|
44
48
|
end
|
45
49
|
end
|
46
50
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcframework_converter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Igor Makarov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|