Skip to content

Commit

Permalink
Merge pull request #1 from tangem/feature/IOS-5792-SPM-dependencies-s…
Browse files Browse the repository at this point in the history
…upport

IOS-5792: Add SPM dependencies support
  • Loading branch information
m3g0byt3 authored Feb 6, 2024
2 parents 19ef484 + bb1cf0d commit de30521
Show file tree
Hide file tree
Showing 27 changed files with 398,981 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// swift-tools-version: 5.4
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "SwiftProtobufBinaries",
products: [
.library(
name: "SwiftProtobuf",
targets: ["SwiftProtobufBinaries"]
),
],
targets: [
.binaryTarget(
name: "SwiftProtobufBinaries",
path: "SwiftProtobuf.xcframework"
)
]
)
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[SwiftProtobuf library](https://github.com/apple/swift-protobuf) binaries (iOS + iOS Simulator)


# Building and updating

1. Clone [Trust Wallet Core fork](https://github.com/tangem/wallet-core)
2. Install the required dependencies by following [the official guide](https://developer.trustwallet.com/wallet-core/building).
3. [Optional] Update **SwiftProtobuf** library:
* Make sure that the new version of the **SwiftProtobuf** library is compatible with other consumers of a binary artifact (`grpc-swift`, `hedera-sdk-swift`, `SwiftBinanceChain`, `blockchain-sdk-swift`, and so on)
* Set a new version in the `./tools/dependencies-version` file
* Set a new version in the `./swift/Podfile` file
4. Build C++ and Rust sources by running `./bootstrap.sh` command
5. Build iOS sources by running `./tools/generate-files ios` command
6. Navigate to the `.swift` folder
7. Build binary artefacts by running `fastlane ios xcframework` command
8. Copy the **SwiftProtobuf** binary artefact `./swift/build/SwiftProtobuf.xcframework` to this repo's root folder
9. After merging the PR with your changes, assign the appropriate tag (mirrors the version of the **SwiftProtobuf** library built as a binary artefact)
44 changes: 44 additions & 0 deletions SwiftProtobuf.xcframework/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>BinaryPath</key>
<string>SwiftProtobuf.framework/SwiftProtobuf</string>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>SwiftProtobuf.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
<dict>
<key>BinaryPath</key>
<string>SwiftProtobuf.framework/SwiftProtobuf</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>SwiftProtobuf.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>
Loading

0 comments on commit de30521

Please sign in to comment.