xcframework_converter 0.1.2 → 0.1.3
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 +11 -5
- 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: ed8ad6ac521bd6f26cae4e1ed130e7faf4c861c9367d10a591f65ace5e0d0180
|
|
4
|
+
data.tar.gz: 3a214bc46c53d8413a4082783d24d9fc4ebecdcf9bc695edd3a1908561eb952c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 23717de292d647163e52c8c2055878b45c7e79dceb01e000bcb29830edb9c26c44e928c1dea8df1ec33f1f224fc7f9bbeb79ca876cd4a14d80cafe0eddfad87e
|
|
7
|
+
data.tar.gz: d00b1bf35a52d2d42bba03f84ce88f35e19edab370465acb08d20bb886ced4e534bf5385e0f036aa3ee2ff5b341f612c080873a200142badc79b517fe2493cf4
|
|
@@ -7,7 +7,7 @@ require 'cocoapods/xcode/xcframework'
|
|
|
7
7
|
require 'fileutils'
|
|
8
8
|
require 'xcodeproj'
|
|
9
9
|
|
|
10
|
-
# rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
|
10
|
+
# rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/ModuleLength, Metrics/PerceivedComplexity
|
|
11
11
|
|
|
12
12
|
# Converts a framework (static or dynamic) to XCFrameworks, adding an arm64 simulator patch.
|
|
13
13
|
# For more info:
|
|
@@ -29,7 +29,7 @@ module XCFrameworkConverter
|
|
|
29
29
|
proxy.vendored_frameworks = consumer.vendored_frameworks - before_rename + after_rename
|
|
30
30
|
before_rename
|
|
31
31
|
end.flatten.uniq
|
|
32
|
-
|
|
32
|
+
|
|
33
33
|
next if frameworks_to_convert.empty?
|
|
34
34
|
|
|
35
35
|
pod_path = installer.sandbox.pod_dir(Pod::Specification.root_name(spec.name))
|
|
@@ -64,13 +64,21 @@ module XCFrameworkConverter
|
|
|
64
64
|
end
|
|
65
65
|
Xcodeproj::Plist.write_to_path(plist, xcframework_path.join('Info.plist'))
|
|
66
66
|
FileUtils.rm_rf(path)
|
|
67
|
-
final_framework =
|
|
67
|
+
final_framework = open_xcframework(xcframework_path)
|
|
68
68
|
final_framework.slices.each do |slice|
|
|
69
69
|
patch_arm_binary(slice) if slice.platform == :ios && slice.platform_variant == :simulator
|
|
70
70
|
cleanup_unused_archs(slice)
|
|
71
71
|
end
|
|
72
72
|
end
|
|
73
73
|
|
|
74
|
+
def open_xcframework(xcframework_path)
|
|
75
|
+
if Pod::Xcode::XCFramework.instance_method(:initialize).arity == 2
|
|
76
|
+
Pod::Xcode::XCFramework.new(File.basename(xcframework_path), xcframework_path.realpath)
|
|
77
|
+
else
|
|
78
|
+
Pod::Xcode::XCFramework.new(xcframework_path.realpath)
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
74
82
|
def patch_arm_binary(slice)
|
|
75
83
|
require 'macho'
|
|
76
84
|
|
|
@@ -128,5 +136,3 @@ module XCFrameworkConverter
|
|
|
128
136
|
end
|
|
129
137
|
end
|
|
130
138
|
end
|
|
131
|
-
|
|
132
|
-
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
|
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.3
|
|
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-12-
|
|
11
|
+
date: 2021-12-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cocoapods
|