xcframework_converter 0.1.0 → 0.1.1
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/README.md +34 -11
- data/lib/xcframework_converter.rb +4 -0
- data/lib/xcframework_converter/version.rb +1 -1
- 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: 73791ebb8115008970a6beb4f8365313af86757023c0e04046410be09c58bf11
|
4
|
+
data.tar.gz: d4f69fa6eba4f1f501b6dd382719efeb8a3ece77926b2b39a79c8e09e8ff2206
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33020857576ceb88146c5fed0d793e28daaf653f06ba904eb4f24a9cc56cf504edc7152aab68b249ab026d0e2f89aca32b2890d0e80b1f74613933f35da3d7e8
|
7
|
+
data.tar.gz: 8130336cd0406ee3386cf3b89fc2bf687d7b2ae20bacc46cb82986b5058f925e4a89e3f2b4c7ca0a0ddc5b5faf4275e70eb4f238929eaf0fc6344554b0723941
|
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
1
|
+
# XCFrameworkConverter
|
2
|
+
[](https://rubygems.org/gems/xcframework_converter)
|
3
|
+
[](https://twitter.com/igormaka)
|
4
|
+
[](./LICENSE.txt)
|
6
5
|
|
6
|
+
This little gem allows to take an ancient `.framework` (static or dynamic), and turn it into a fully fledged `.xcframework`. In addition, it will patch the binary to add an `arm64` simulator slice. There's also a CocoaPods patcher that allows this to operate without customizing the `Podfile` dependencies.
|
7
7
|
## Installation
|
8
8
|
|
9
9
|
Add this line to your application's Gemfile:
|
@@ -22,17 +22,40 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
### CLI
|
26
|
+
|
27
|
+
```bash
|
28
|
+
xcfconvert <path/to/Framework.framework>
|
29
|
+
```
|
30
|
+
|
31
|
+
### CocoaPods
|
32
|
+
In your podfile:
|
33
|
+
```ruby
|
34
|
+
require 'xcframework_converter'
|
35
|
+
# Define your dependencies...
|
36
|
+
pre_install do |installer|
|
37
|
+
XCFrameworkConverter.convert_frameworks_to_xcframeworks!(installer)
|
38
|
+
end
|
39
|
+
```
|
40
|
+
|
41
|
+
This will achieve two things:
|
42
|
+
|
43
|
+
1. When a pod with vendored `.framework`-s is added, they will be converted to `.xcframework`-s.
|
44
|
+
2. Upon each `pod install`, the corresponding pod specifications will be patched so that the project will consume the `.xcframework`-s correctly.
|
45
|
+
|
46
|
+
## Is it reliable?
|
47
|
+
Sort of. The software is provided as is, with no guarantees of correctnes. It's meant to be a workaround. For the correct solution, ask the framework vendor for an update. However, PRs are welcome.
|
26
48
|
|
27
|
-
##
|
49
|
+
## How does it work?
|
50
|
+
An XCFramework is basically a bundle of folders.
|
28
51
|
|
29
|
-
|
52
|
+
The tool will create the folder and its subfolders, write the correct `Info.plist`, and clean up the relevant fat binary files so that they contain only the relevant architectures.
|
30
53
|
|
31
|
-
|
54
|
+
Additionally, the tool will create a new, patched `arm64` binary for the iOS Simulator. For that, it uses the code and knowledge of [Bogo Giertler](https://github.com/bogo). The binary patching code is embedded in the gem. For more info, check Bogo's blog for the posts on how to patch a [static library](https://bogo.wtf/arm64-to-sim.html) and a [dynamic library](https://bogo.wtf/arm64-to-sim-dylibs.html).
|
32
55
|
|
33
56
|
## Contributing
|
34
57
|
|
35
|
-
|
58
|
+
Pull requests are welcome on GitHub at https://github.com/igor-makarov/XCFrameworkConverter. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/igor-makarov/XCFrameworkConverter/blob/master/CODE_OF_CONDUCT.md).
|
36
59
|
|
37
60
|
## License
|
38
61
|
|
@@ -40,4 +63,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
40
63
|
|
41
64
|
## Code of Conduct
|
42
65
|
|
43
|
-
Everyone interacting in the XcframeworkConverter project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
66
|
+
Everyone interacting in the XcframeworkConverter project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/igor-makarov/XCFrameworkConverter/blob/master/CODE_OF_CONDUCT.md).
|
@@ -76,6 +76,10 @@ module XCFrameworkConverter
|
|
76
76
|
when :static
|
77
77
|
patch_arm_binary_static(slice)
|
78
78
|
end
|
79
|
+
|
80
|
+
slice.path.glob('**/arm64*.swiftinterface').each do |interface_file|
|
81
|
+
`sed -i '' -E 's/target arm64-apple-ios([0-9.]+) /target arm64-apple-ios\\1-simulator /g' "#{interface_file}"`
|
82
|
+
end
|
79
83
|
end
|
80
84
|
|
81
85
|
def patch_arm_binary_dynamic(slice)
|
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.1
|
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-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|