Skip to content

Commit

Permalink
Add support for Cocoapods (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbihel authored Feb 28, 2024
1 parent 3708a3c commit cd1c482
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ jobs:
- name: Update Swift Package definition
run: |
sed -i '' 's/.binaryTarget.*/.binaryTarget(name: "RustFramework", url: "https:\/\/github.com\/spruceid\/wallet-sdk-rs\/releases\/download\/${{ github.event.inputs.version }}\/RustFramework.xcframework.zip", checksum: "${{ env.XCF_CHECKSUM }}"),/' Package.swift
- name: Update Cocoapods definitions
run: |
sed -i '' 's/[0-9]+\.[0-9]+\.[0-9]+/${{ github.events.inputs.version }}/' WalletSdkRs.podspec
sed -i '' 's/[0-9]+\.[0-9]+\.[0-9]+/${{ github.events.inputs.version }}/' WalletSdkRsRustFramework.podspec
- name: Push changes and tag
run: |
Expand Down
21 changes: 21 additions & 0 deletions WalletSdkRs.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Pod::Spec.new do |spec|
spec.name = "WalletSdkRs"
spec.version = "0.0.6"
spec.summary = "Rust-generated Swift Wallet SDK."
spec.description = <<-DESC
Rust layer for the Swift Wallet SDK.
DESC
spec.homepage = "https://github.com/spruceid/wallet-sdk-rs"
spec.license = "MIT OR Apache-2.0"
spec.author = { "Spruce Systems, Inc." => "hello@spruceid.com" }
spec.platform = :ios

spec.ios.deployment_target = '13.0'

spec.static_framework = true
spec.source = { :git => "https://spruceid/wallet-sdk-rs.git", :tag => "#{spec.version}" }
spec.source_files = "WalletSdkRs/Sources/WalletSdkRs/*.swift"
spec.frameworks = 'Foundation'

spec.dependency 'WalletSdkRsRustFramework', "#{spec.version}"
end
18 changes: 18 additions & 0 deletions WalletSdkRsRustFramework.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Pod::Spec.new do |spec|
spec.name = "WalletSdkRsRustFramework"
spec.version = "0.0.6"
spec.summary = "Rust-generated Framework Swift Wallet SDK."
spec.description = <<-DESC
Rust layer framework for the Swift Wallet SDK.
DESC
spec.homepage = "https://github.com/spruceid/wallet-sdk-rs"
spec.license = "MIT OR Apache-2.0"
spec.author = { "Spruce Systems, Inc." => "hello@spruceid.com" }
spec.platform = :ios

spec.ios.deployment_target = '13.0'

spec.static_framework = true
spec.source = { :http => "https://github.com/spruceid/wallet-sdk-rs/releases/download/#{spec.version}/RustFramework.xcframework.zip" }
spec.vendored_frameworks = 'WalletSdkRs/RustFramework.xcframework'
end

0 comments on commit cd1c482

Please sign in to comment.