Skip to content

Commit

Permalink
chore(swift): build macos-universal instead of separate binaries for …
Browse files Browse the repository at this point in the history
…arm and x86
  • Loading branch information
mehcode committed Oct 18, 2022
1 parent 7bf223c commit be933a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 21 deletions.
11 changes: 4 additions & 7 deletions sdk/rust/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,20 +129,17 @@ tasks:

- rm -rf ../swift/CHedera.xcframework/{ios,macos}-*/

- mkdir -p ../swift/CHedera.xcframework/macos-{x86_64,arm64}/Headers/
- mkdir -p ../swift/CHedera.xcframework/macos-universal/Headers/
- mkdir -p ../swift/CHedera.xcframework/ios-{x86_64-simulator,arm64}/Headers/

- cp ../c/lib/macos-x86_64/libhedera.a ../swift/CHedera.xcframework/macos-x86_64/
- cp ../c/lib/macos-arm64/libhedera.a ../swift/CHedera.xcframework/macos-arm64/
- lipo ../c/lib/macos-x86_64/libhedera.a ../c/lib/macos-arm64/libhedera.a -output ../swift/CHedera.xcframework/macos-universal/libhedera.a -create
- cp ../c/lib/ios-x86_64/libhedera.a ../swift/CHedera.xcframework/ios-x86_64-simulator/
- cp ../c/lib/ios-arm64/libhedera.a ../swift/CHedera.xcframework/ios-arm64/

- cp ../c/include/hedera.h ../swift/CHedera.xcframework/macos-x86_64/Headers/
- cp ../c/include/hedera.h ../swift/CHedera.xcframework/macos-arm64/Headers/
- cp ../c/include/hedera.h ../swift/CHedera.xcframework/macos-universal/Headers/
- cp ../c/include/hedera.h ../swift/CHedera.xcframework/ios-x86_64-simulator/Headers/
- cp ../c/include/hedera.h ../swift/CHedera.xcframework/ios-arm64/Headers/

- cp ../swift/CHedera.xcframework/module.modulemap ../swift/CHedera.xcframework/macos-x86_64/Headers/
- cp ../swift/CHedera.xcframework/module.modulemap ../swift/CHedera.xcframework/macos-arm64/Headers/
- cp ../swift/CHedera.xcframework/module.modulemap ../swift/CHedera.xcframework/macos-universal/Headers/
- cp ../swift/CHedera.xcframework/module.modulemap ../swift/CHedera.xcframework/ios-x86_64-simulator/Headers/
- cp ../swift/CHedera.xcframework/module.modulemap ../swift/CHedera.xcframework/ios-arm64/Headers/
15 changes: 1 addition & 14 deletions sdk/swift/CHedera.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -38,25 +38,12 @@
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>macos-arm64</string>
<string>macos-universal</string>
<key>LibraryPath</key>
<string>libhedera.a</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>macos</string>
</dict>
<dict>
<key>HeadersPath</key>
<string>Headers</string>
<key>LibraryIdentifier</key>
<string>macos-x86_64</string>
<key>LibraryPath</key>
<string>libhedera.a</string>
<key>SupportedArchitectures</key>
<array>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
Expand Down

0 comments on commit be933a9

Please sign in to comment.